diff Include/pythonrun.h @ 66685:713c6b6ca5ce

Add an "optimize" parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile.
author Georg Brandl <georg@python.org>
date Sat, 04 Dec 2010 10:26:46 +0000
parents 62b61abd02b8
children bede83e20853
line wrap: on
line diff
--- a/Include/pythonrun.h	Sat Dec 04 10:16:05 2010 +0000
+++ b/Include/pythonrun.h	Sat Dec 04 10:26:46 2010 +0000
@@ -76,9 +76,10 @@
 #ifdef Py_LIMITED_API
 PyAPI_FUNC(PyObject *) Py_CompileStringFlags(const char *, const char *, int);
 #else
-#define Py_CompileString(str, p, s) Py_CompileStringFlags(str, p, s, NULL)
-PyAPI_FUNC(PyObject *) Py_CompileStringFlags(const char *, const char *, int,
-                                             PyCompilerFlags *);
+#define Py_CompileString(str, p, s) Py_CompileStringExFlags(str, p, s, NULL, -1)
+#define Py_CompileStringFlags(str, p, s, f) Py_CompileStringExFlags(str, p, s, f, -1)
+PyAPI_FUNC(PyObject *) Py_CompileStringExFlags(const char *, const char *, int,
+                                               PyCompilerFlags *, int);
 #endif
 PyAPI_FUNC(struct symtable *) Py_SymtableString(const char *, const char *, int);