File rekall-python25.diff of Package rekall
--- script/python/kb_basic.cpp
+++ script/python/kb_basic.cpp
@@ -400,7 +400,7 @@
QStringList pairs ;
PyObject *key ;
PyObject *value ;
- int pos = 0 ;
+ Py_ssize_t pos = 0 ;
//xxx use pickle or marshal to create the data representation instead
//xxx of a simple string representation?
--- script/python/kb_pycontainer.cpp
+++ script/python/kb_pycontainer.cpp
@@ -60,7 +60,7 @@
}
char *buffer ;
- int len ;
+ Py_ssize_t len ;
PyString_AsStringAndSize (pyImage, &buffer, &len) ;
QByteArray ba ;
--- script/python/kb_pysupport.cpp
+++ script/python/kb_pysupport.cpp
@@ -37,7 +37,7 @@
{
PyObject *key ;
PyObject *value ;
- int pos = 0 ;
+ Py_ssize_t pos = 0 ;
kbDict.setAutoDelete (true) ;
--- script/python/tkc_pydebugbase.cpp
+++ script/python/tkc_pydebugbase.cpp
@@ -1082,7 +1082,7 @@
{
PyObject *pkey ;
PyObject *pvalue ;
- int dictPos = 0 ;
+ Py_ssize_t dictPos = 0 ;
while (PyDict_Next (pyDict, &dictPos, &pkey, &pvalue))
{
@@ -1135,7 +1135,7 @@
PyObject *pyKey ;
PyObject *pyValue ;
QString name ;
- int dictPos = 0 ;
+ Py_ssize_t dictPos = 0 ;
/* See if we have been here before, in which case there is no */
/* point in going there again. This also prevents infinite */
--- script/python/tkc_pyvaluelist.cpp
+++ script/python/tkc_pyvaluelist.cpp
@@ -180,7 +180,7 @@
ADDSUBVAL ("Locals", frame->f_locals ) ;
ADDSUBVAL ("Code", frame->f_code ) ;
-#if __PY22PLUS
+#if 0
PyObject *floc ;
PyObject *map = frame->f_code->co_varnames ;