[pypy-svn] r73424 - in pypy/branch/cpython-extension/pypy/module/cpyext: . include
xoraxax at codespeak.net
xoraxax at codespeak.net
Tue Apr 6 01:31:29 CEST 2010
Author: xoraxax
Date: Tue Apr 6 01:31:28 2010
New Revision: 73424
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/__init__.py
pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h
Log:
Import/include the pycobject files and set a few defines and import limits.h.
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/__init__.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/__init__.py (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/__init__.py Tue Apr 6 01:31:28 2010
@@ -52,6 +52,7 @@
import pypy.module.cpyext.iterator
import pypy.module.cpyext.unicodeobject
import pypy.module.cpyext.misc
+import pypy.module.cpyext.pycobject
# now that all rffi_platform.Struct types are registered, configure them
api.configure_types()
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 Tue Apr 6 01:31:28 2010
@@ -12,7 +12,6 @@
#define SIZEOF_VOID_P sizeof(void *)
#define WITH_DOC_STRINGS
#define HAVE_UNICODE
-#define INT_MAX (1 << (8 * sizeof(int) - 1))
#define WITHOUT_COMPLEX
/* Compat stuff */
@@ -20,6 +19,7 @@
# include <inttypes.h>
# include <stdint.h>
# include <stddef.h>
+# include <limits.h>
# define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
# define PyAPI_DATA(RTYPE) extern RTYPE
#else
@@ -33,6 +33,7 @@
#define Py_ssize_t long
#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)
/* Convert a possibly signed character to a nonnegative int */
/* XXX This assumes characters are 8 bits wide */
@@ -48,6 +49,7 @@
#include <pypy_macros.h>
+int PyOS_snprintf(char *str, size_t size, const char *format, ...);
#include "patchlevel.h"
#include "object.h"
@@ -76,6 +78,7 @@
#include "unicodeobject.h"
#include "eval.h"
#include "pymem.h"
+#include "pycobject.h"
// XXX This shouldn't be included here
#include "structmember.h"
More information about the Pypy-commit
mailing list