[GRASS-SVN] r38892 - grass/trunk/swig/include/python

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 27 18:42:08 EDT 2009


Author: glynn
Date: 2009-08-27 18:42:07 -0400 (Thu, 27 Aug 2009)
New Revision: 38892

Modified:
   grass/trunk/swig/include/python/common.i
Log:
Define Py_ssize_t for Python < 2.5


Modified: grass/trunk/swig/include/python/common.i
===================================================================
--- grass/trunk/swig/include/python/common.i	2009-08-27 20:58:55 UTC (rev 38891)
+++ grass/trunk/swig/include/python/common.i	2009-08-27 22:42:07 UTC (rev 38892)
@@ -2,6 +2,13 @@
 #include <stdio.h>
 #include <grass/gis.h>
 #include <grass/raster.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
+
 %}
 
 %rename(my_def) def;



More information about the grass-commit mailing list