[Python-checkins] r45543 - in python/trunk: Misc/NEWS Python/pythonrun.c

thomas.heller python-checkins at python.org
Tue Apr 18 20:51:07 CEST 2006


Author: thomas.heller
Date: Tue Apr 18 20:51:06 2006
New Revision: 45543

Modified:
   python/trunk/Misc/NEWS
   python/trunk/Python/pythonrun.c
Log:
Change those parts of the Python-api that were functions in 2.4, and
are now macros to exported functions again.

Fixes [ 1465834 ] bdist_wininst preinstall script support is broken in 2.5a1.


Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Tue Apr 18 20:51:06 2006
@@ -12,6 +12,15 @@
 Core and builtins
 -----------------
 
+- Bug #1465834: 'bdist_wininst preinstall script support' was fixed
+  by converting these apis from macros into exported functions again:
+
+    PyParser_SimpleParseFile PyParser_SimpleParseString PyRun_AnyFile
+    PyRun_AnyFileEx PyRun_AnyFileFlags PyRun_File PyRun_FileEx
+    PyRun_FileFlags PyRun_InteractiveLoop PyRun_InteractiveOne
+    PyRun_SimpleFile PyRun_SimpleFileEx PyRun_SimpleString
+    PyRun_String Py_CompileString
+
 - Under COUNT_ALLOCS, types are not necessarily immortal anymore.
 
 - All uses of PyStructSequence_InitType have been changed to initialize

Modified: python/trunk/Python/pythonrun.c
==============================================================================
--- python/trunk/Python/pythonrun.c	(original)
+++ python/trunk/Python/pythonrun.c	Tue Apr 18 20:51:06 2006
@@ -1690,20 +1690,112 @@
 /* Deprecated C API functions still provided for binary compatiblity */
 
 #undef PyParser_SimpleParseFile
-#undef PyParser_SimpleParseString
-
-node *
+PyAPI_FUNC(node *)
 PyParser_SimpleParseFile(FILE *fp, const char *filename, int start)
 {
 	return PyParser_SimpleParseFileFlags(fp, filename, start, 0);
 }
 
-node *
+#undef PyParser_SimpleParseString
+PyAPI_FUNC(node *)
 PyParser_SimpleParseString(const char *str, int start)
 {
 	return PyParser_SimpleParseStringFlags(str, start, 0);
 }
 
+#undef PyRun_AnyFile
+PyAPI_FUNC(int)
+PyRun_AnyFile(FILE *fp, const char *name)
+{
+	return PyRun_AnyFileExFlags(fp, name, 0, NULL);
+}
+
+#undef PyRun_AnyFileEx
+PyAPI_FUNC(int)
+PyRun_AnyFileEx(FILE *fp, const char *name, int closeit)
+{
+	return PyRun_AnyFileExFlags(fp, name, closeit, NULL);
+}
+
+#undef PyRun_AnyFileFlags
+PyAPI_FUNC(int)
+PyRun_AnyFileFlags(FILE *fp, const char *name, PyCompilerFlags *flags)
+{
+	return PyRun_AnyFileExFlags(fp, name, 0, flags);
+}
+
+#undef PyRun_File
+PyAPI_FUNC(PyObject *)
+PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l)
+{
+        return PyRun_FileExFlags(fp, p, s, g, l, 0, NULL);
+}
+
+#undef PyRun_FileEx
+PyAPI_FUNC(PyObject *)
+PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c)
+{
+        return PyRun_FileExFlags(fp, p, s, g, l, c, NULL);
+}
+
+#undef PyRun_FileFlags
+PyAPI_FUNC(PyObject *)
+PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l,
+		PyCompilerFlags *flags)
+{
+        return PyRun_FileExFlags(fp, p, s, g, l, 0, flags);
+}
+
+#undef PyRun_SimpleFile
+PyAPI_FUNC(int)
+PyRun_SimpleFile(FILE *f, const char *p)
+{
+	return PyRun_SimpleFileExFlags(f, p, 0, NULL);
+}
+
+#undef PyRun_SimpleFileEx
+PyAPI_FUNC(int)
+PyRun_SimpleFileEx(FILE *f, const char *p, int c)
+{
+	return PyRun_SimpleFileExFlags(f, p, c, NULL);
+}
+
+
+#undef PyRun_String
+PyAPI_FUNC(PyObject *)
+PyRun_String(const char *str, int s, PyObject *g, PyObject *l)
+{
+	return PyRun_StringFlags(str, s, g, l, NULL);
+}
+
+#undef PyRun_SimpleString
+PyAPI_FUNC(int)
+PyRun_SimpleString(const char *s)
+{
+	return PyRun_SimpleStringFlags(s, NULL);
+}
+
+#undef Py_CompileString
+PyAPI_FUNC(PyObject *)
+Py_CompileString(const char *str, const char *p, int s)
+{
+	return Py_CompileStringFlags(str, p, s, NULL);
+}
+
+#undef PyRun_InteractiveOne
+PyAPI_FUNC(int)
+PyRun_InteractiveOne(FILE *f, const char *p)
+{
+	return PyRun_InteractiveOneFlags(f, p, NULL);
+}
+
+#undef PyRun_InteractiveLoop
+PyAPI_FUNC(int)
+PyRun_InteractiveLoop(FILE *f, const char *p)
+{
+	return PyRun_InteractiveLoopFlags(f, p, NULL);
+}
+
 #ifdef __cplusplus
 }
 #endif


More information about the Python-checkins mailing list