Commit ea9d1ad6 authored by Jonathan Rogers's avatar Jonathan Rogers Committed by Johan Dahlin

reviewed by: Johan Dahlin

2008-01-11  Jonathan Rogers <jonner@teegra.net>

	reviewed by: Johan Dahlin

	* src/nautilus-python-object.c:
	* src/nautilus-python.c: (nautilus_python_load_file):
	* src/nautilus-python.h:
	Use Py_ssize_t instead of int, so nautilus-python works on Python 2.5
	fixes #444366	


svn path=/trunk/; revision=48
parent 66a420ae
2008-01-11 Jonathan Rogers <jonner@teegra.net>
reviewed by: Johan Dahlin
* src/nautilus-python-object.c:
* src/nautilus-python.c: (nautilus_python_load_file):
* src/nautilus-python.h:
Use Py_ssize_t instead of int, so nautilus-python works on Python 2.5
fixes #444366
2006-07-02 Gustavo J. A. M. Carneiro <gjc@gnome.org>
* src/nautilus-python.c (nautilus_module_shutdown): Re-enable
......
......@@ -74,7 +74,7 @@ static GObjectClass *parent_class;
#define HANDLE_LIST(py_ret, type, type_name) \
{ \
int i = 0; \
Py_ssize_t i = 0; \
if (!PySequence_Check(py_ret) || PyString_Check(py_ret)) { \
PyErr_SetString(PyExc_TypeError, \
METHOD_NAME " must return a sequence"); \
......
......@@ -114,7 +114,7 @@ nautilus_python_load_file(GTypeModule *type_module, const gchar *filename)
PyObject *main_module, *main_locals, *locals, *key, *value;
PyObject *module;
GType gtype;
int pos = 0;
Py_ssize_t pos = 0;
debug_enter_args("filename=%s", filename);
......
......@@ -26,6 +26,12 @@
#include <glib/gprintf.h>
#include <Python.h>
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
#define PY_SSIZE_T_MIN INT_MIN
#endif
typedef enum {
NAUTILUS_PYTHON_DEBUG_MISC = 1 << 0,
} NautilusPythonDebug;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment