[Checkins] SVN: zope.app.container/trunk/src/zope/app/container/_zope_app_container_contained.c - Since we are not including the original proxy.h here, we have to define Py_ssize_t ourselves.

Sidnei da Silva sidnei at enfoldsystems.com
Thu Oct 16 14:15:25 EDT 2008


Log message for revision 92281:
   - Since we are not including the original proxy.h here, we have to define Py_ssize_t ourselves.

Changed:
  U   zope.app.container/trunk/src/zope/app/container/_zope_app_container_contained.c

-=-
Modified: zope.app.container/trunk/src/zope/app/container/_zope_app_container_contained.c
===================================================================
--- zope.app.container/trunk/src/zope/app/container/_zope_app_container_contained.c	2008-10-16 12:46:52 UTC (rev 92280)
+++ zope.app.container/trunk/src/zope/app/container/_zope_app_container_contained.c	2008-10-16 18:15:23 UTC (rev 92281)
@@ -36,6 +36,17 @@
 
 static PyObject *str_p_deactivate;
 
+#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
+typedef Py_ssize_t (*lenfunc)(PyObject *);
+typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t);
+typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t);
+typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *);
+typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
+#endif
+
 typedef struct {
   cPersistent_HEAD
   PyObject *po_weaklist;



More information about the Checkins mailing list