From 8334fd9285a8e9f0864b0453ae738fe3f6893b21 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 4 Dec 2010 10:26:46 +0000 Subject: Add an "optimize" parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile. --- Include/pythonrun.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Include/pythonrun.h') diff --git a/Include/pythonrun.h b/Include/pythonrun.h index 95bdf9e219..4eae54922e 100644 --- a/Include/pythonrun.h +++ b/Include/pythonrun.h @@ -76,9 +76,10 @@ PyAPI_FUNC(PyObject *) PyRun_FileExFlags(FILE *, const char *, int, #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); -- cgit v1.2.1