[pypy-svn] r73546 - pypy/branch/cpython-extension/pypy/module/cpyext/include
xoraxax at codespeak.net
xoraxax at codespeak.net
Thu Apr 8 15:17:41 CEST 2010
Author: xoraxax
Date: Thu Apr 8 15:17:40 2010
New Revision: 73546
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h
Log:
Amended Python.h
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h Thu Apr 8 15:17:40 2010
@@ -45,9 +45,17 @@
#define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t)-1)>>1))
#define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1)
#define Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) (NARROW)(VALUE)
+// obviously wrong
#define SIZEOF_SIZE_T 4
#define SIZEOF_LONG 4
+// from pyport.h
+#ifdef SIZE_MAX
+#define PY_SIZE_MAX SIZE_MAX
+#else
+#define PY_SIZE_MAX ((size_t)-1)
+#endif
+
/* Convert a possibly signed character to a nonnegative int */
/* XXX This assumes characters are 8 bits wide */
#ifdef __CHAR_UNSIGNED__
More information about the Pypy-commit
mailing list