patches/gedit-02-py_ssize_t.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 15875 829b16bd534c
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446

--- gedit-2.25.7/plugin-loaders/python/bindings/geditmessage.override.ori	2009-02-18 09:15:15.091476112 +0000
+++ gedit-2.25.7/plugin-loaders/python/bindings/geditmessage.override	2009-02-18 09:18:16.108536327 +0000
@@ -4,6 +4,12 @@
 #include <gedit/gedit-message-bus.h>
 #include <gedit/gedit-message.h>
 
+#if PY_VERSION_HEX < 0x02050000
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+#endif
+
 static GType
 _helper_wrap_get_gtype_from_pytype (PyObject *pytype)
 {