[pypy-svn] r73383 - pypy/branch/cpython-extension/pypy/module/cpyext/include
xoraxax at codespeak.net
xoraxax at codespeak.net
Sun Apr 4 20:35:03 CEST 2010
Author: xoraxax
Date: Sun Apr 4 20:35:01 2010
New Revision: 73383
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h
pypy/branch/cpython-extension/pypy/module/cpyext/include/pymem.h
Log:
Add comments and a statichere define.
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 Sun Apr 4 20:35:01 2010
@@ -39,6 +39,8 @@
#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
#endif
+#define statichere static
+
#define Py_MEMCPY memcpy
#include <pypy_macros.h>
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/include/pymem.h
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/include/pymem.h (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/include/pymem.h Sun Apr 4 20:35:01 2010
@@ -5,8 +5,8 @@
#define PyMem_REALLOC(p, n) realloc((p), (n) ? (n) : 1)
#define PyMem_FREE free
-/* XXX use obmalloc like cpython does */
+/* XXX use obmalloc like cpython and pypy do, otherwise we might get segfaults */
#define PyObject_MALLOC PyMem_MALLOC
-#define PyObject_REALLOC PyMem_REALLOC
+//#define PyObject_REALLOC PyMem_REALLOC
#define PyObject_FREE PyMem_FREE
More information about the Pypy-commit
mailing list