[Python-checkins] cpython: Move code related to compile from Python.h to compile.h
victor.stinner
python-checkins at python.org
Thu Sep 29 01:05:42 CEST 2011
http://hg.python.org/cpython/rev/775977c601cd
changeset: 72511:775977c601cd
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Thu Sep 29 01:04:08 2011 +0200
summary:
Move code related to compile from Python.h to compile.h
files:
Include/Python.h | 19 -------------------
Include/compile.h | 14 ++++++++++++--
2 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/Include/Python.h b/Include/Python.h
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -127,30 +127,11 @@
#include "dtoa.h"
#include "fileutils.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* _Py_Mangle is defined in compile.c */
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
/* Argument must be a char or an int in [-128, 127] or [0, 255]. */
#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
#include "pyfpe.h"
-/* These definitions must match corresponding definitions in graminit.h.
- There's code in compile.c that checks that they are the same. */
-#define Py_single_input 256
-#define Py_file_input 257
-#define Py_eval_input 258
-
/* Define macros for inline documentation. */
#define PyDoc_VAR(name) static char name[]
#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
diff --git a/Include/compile.h b/Include/compile.h
--- a/Include/compile.h
+++ b/Include/compile.h
@@ -1,7 +1,7 @@
-#ifndef Py_LIMITED_API
#ifndef Py_COMPILE_H
#define Py_COMPILE_H
+#ifndef Py_LIMITED_API
#include "code.h"
#ifdef __cplusplus
@@ -38,9 +38,19 @@
PyArena *arena);
PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
+/* _Py_Mangle is defined in compile.c */
+PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
#ifdef __cplusplus
}
#endif
+
+#endif /* !Py_LIMITED_API */
+
+/* These definitions must match corresponding definitions in graminit.h.
+ There's code in compile.c that checks that they are the same. */
+#define Py_single_input 256
+#define Py_file_input 257
+#define Py_eval_input 258
+
#endif /* !Py_COMPILE_H */
-#endif /* !Py_LIMITED_API */
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list