[Python-checkins] r84335 - in python/branches/pep-0384/Include: Python.h compile.h eval.h object.h pythonrun.h

martin.v.loewis python-checkins at python.org
Sat Aug 28 11:51:35 CEST 2010


Author: martin.v.loewis
Date: Sat Aug 28 11:51:34 2010
New Revision: 84335

Log:
Fix compilation errors under Py_LIMITED_API.


Modified:
   python/branches/pep-0384/Include/Python.h
   python/branches/pep-0384/Include/compile.h
   python/branches/pep-0384/Include/eval.h
   python/branches/pep-0384/Include/object.h
   python/branches/pep-0384/Include/pythonrun.h

Modified: python/branches/pep-0384/Include/Python.h
==============================================================================
--- python/branches/pep-0384/Include/Python.h	(original)
+++ python/branches/pep-0384/Include/Python.h	Sat Aug 28 11:51:34 2010
@@ -66,6 +66,7 @@
 
 #include "object.h"
 #include "objimpl.h"
+#include "typeslots.h"
 
 #include "pydebug.h"
 

Modified: python/branches/pep-0384/Include/compile.h
==============================================================================
--- python/branches/pep-0384/Include/compile.h	(original)
+++ python/branches/pep-0384/Include/compile.h	Sat Aug 28 11:51:34 2010
@@ -1,4 +1,4 @@
-
+#ifndef Py_LIMITED_API
 #ifndef Py_COMPILE_H
 #define Py_COMPILE_H
 
@@ -38,3 +38,4 @@
 }
 #endif
 #endif /* !Py_COMPILE_H */
+#endif /* !Py_LIMITED_API */

Modified: python/branches/pep-0384/Include/eval.h
==============================================================================
--- python/branches/pep-0384/Include/eval.h	(original)
+++ python/branches/pep-0384/Include/eval.h	Sat Aug 28 11:51:34 2010
@@ -7,9 +7,9 @@
 extern "C" {
 #endif
 
-PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyCodeObject *, PyObject *, PyObject *);
+PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyObject *, PyObject *, PyObject *);
 
-PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyCodeObject *co,
+PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co,
 					PyObject *globals,
 					PyObject *locals,
 					PyObject **args, int argc,

Modified: python/branches/pep-0384/Include/object.h
==============================================================================
--- python/branches/pep-0384/Include/object.h	(original)
+++ python/branches/pep-0384/Include/object.h	Sat Aug 28 11:51:34 2010
@@ -403,7 +403,7 @@
 
 PyObject* PyType_FromSpec(PyType_Spec*);
 
-
+#ifndef Py_LIMITED_API
 /* The *real* layout of a type object when allocated on the heap */
 typedef struct _heaptypeobject {
     /* Note: there's a dependency on the order of these members
@@ -424,7 +424,7 @@
 /* access macro to the members which are floating "behind" the object */
 #define PyHeapType_GET_MEMBERS(etype) \
     ((PyMemberDef *)(((char *)etype) + Py_TYPE(etype)->tp_basicsize))
-
+#endif
 
 /* Generic type check */
 PyAPI_FUNC(int) PyType_IsSubtype(PyTypeObject *, PyTypeObject *);
@@ -674,9 +674,13 @@
 
 #define _Py_ForgetReference(op) _Py_INC_TPFREES(op)
 
+#ifdef Py_LIMITED_API
+PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
+#else
 #define _Py_Dealloc(op) (                               \
     _Py_INC_TPFREES(op) _Py_COUNT_ALLOCS_COMMA          \
     (*Py_TYPE(op)->tp_dealloc)((PyObject *)(op)))
+#endif
 #endif /* !Py_TRACE_REFS */
 
 #define Py_INCREF(op) (                         \

Modified: python/branches/pep-0384/Include/pythonrun.h
==============================================================================
--- python/branches/pep-0384/Include/pythonrun.h	(original)
+++ python/branches/pep-0384/Include/pythonrun.h	Sat Aug 28 11:51:34 2010
@@ -40,12 +40,10 @@
 PyAPI_FUNC(int) PyRun_SimpleFileExFlags(FILE *, const char *, int, PyCompilerFlags *);
 PyAPI_FUNC(int) PyRun_InteractiveOneFlags(FILE *, const char *, PyCompilerFlags *);
 PyAPI_FUNC(int) PyRun_InteractiveLoopFlags(FILE *, const char *, PyCompilerFlags *);
-#endif
 
 PyAPI_FUNC(struct _mod *) PyParser_ASTFromString(const char *, const char *,
                                                  int, PyCompilerFlags *flags,
                                                  PyArena *);
-#ifndef Py_LIMITED_API
 PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(FILE *, const char *,
                                                const char*, int,
                                                char *, char *,


More information about the Python-checkins mailing list