[GRASS-SVN] r38900 - grass/branches/releasebranch_6_4/swig/include/python

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 28 09:42:54 EDT 2009


Author: martinl
Date: 2009-08-28 09:42:53 -0400 (Fri, 28 Aug 2009)
New Revision: 38900

Modified:
   grass/branches/releasebranch_6_4/swig/include/python/common.i
Log:
glynn: Define Py_ssize_t for Python < 2.5
      (merge from trunk, r38892)


Modified: grass/branches/releasebranch_6_4/swig/include/python/common.i
===================================================================
--- grass/branches/releasebranch_6_4/swig/include/python/common.i	2009-08-28 13:38:28 UTC (rev 38899)
+++ grass/branches/releasebranch_6_4/swig/include/python/common.i	2009-08-28 13:42:53 UTC (rev 38900)
@@ -1,6 +1,13 @@
 %{
 #include <stdio.h>
 #include <grass/gis.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