#endif
PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
-PyAPI_FUNC(int) _PyRun_SimpleFileObject(
- FILE *fp,
- PyObject *filename,
- int closeit,
- PyCompilerFlags *flags);
PyAPI_FUNC(int) PyRun_AnyFileExFlags(
FILE *fp,
const char *filename, /* decoded from the filesystem encoding */
int closeit,
PyCompilerFlags *flags);
-PyAPI_FUNC(int) _PyRun_AnyFileObject(
- FILE *fp,
- PyObject *filename,
- int closeit,
- PyCompilerFlags *flags);
PyAPI_FUNC(int) PyRun_SimpleFileExFlags(
FILE *fp,
const char *filename, /* decoded from the filesystem encoding */
FILE *fp,
const char *filename, /* decoded from the filesystem encoding */
PyCompilerFlags *flags);
-PyAPI_FUNC(int) _PyRun_InteractiveLoopObject(
- FILE *fp,
- PyObject *filename,
- PyCompilerFlags *flags);
PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *,
#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(const char *) _Py_SourceAsString(
- PyObject *cmd,
- const char *funcname,
- const char *what,
- PyCompilerFlags *cf,
- PyObject **cmd_copy);
-
-
/* A function flavor is also exported by libpython. It is required when
libpython is accessed directly rather than using header files which defines
macros below. On Windows, for example, PyAPI_FUNC() uses dllexport to
#define PyRun_FileFlags(fp, p, s, g, l, flags) \
PyRun_FileExFlags((fp), (p), (s), (g), (l), 0, (flags))
-
/* Stuff with no proper home (yet) */
PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, const char *);
PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *);
--- /dev/null
+#ifndef Py_INTERNAL_PYTHONRUN_H
+#define Py_INTERNAL_PYTHONRUN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
+
+extern int _PyRun_SimpleFileObject(
+ FILE *fp,
+ PyObject *filename,
+ int closeit,
+ PyCompilerFlags *flags);
+
+extern int _PyRun_AnyFileObject(
+ FILE *fp,
+ PyObject *filename,
+ int closeit,
+ PyCompilerFlags *flags);
+
+extern int _PyRun_InteractiveLoopObject(
+ FILE *fp,
+ PyObject *filename,
+ PyCompilerFlags *flags);
+
+extern const char* _Py_SourceAsString(
+ PyObject *cmd,
+ const char *funcname,
+ const char *what,
+ PyCompilerFlags *cf,
+ PyObject **cmd_copy);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // !Py_INTERNAL_PYTHONRUN_H
+
$(srcdir)/Include/internal/pycore_pymem.h \
$(srcdir)/Include/internal/pycore_pymem_init.h \
$(srcdir)/Include/internal/pycore_pystate.h \
+ $(srcdir)/Include/internal/pycore_pythonrun.h \
$(srcdir)/Include/internal/pycore_pythread.h \
$(srcdir)/Include/internal/pycore_range.h \
$(srcdir)/Include/internal/pycore_runtime.h \
#include "pycore_pathconfig.h" // _PyPathConfig_ComputeSysPath0()
#include "pycore_pylifecycle.h" // _Py_PreInitializeFromPyArgv()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
+#include "pycore_pythonrun.h" // _PyRun_AnyFileObject()
/* Includes for exit_sigint() */
#include <stdio.h> // perror()
#include "Python.h"
+#include "pycore_pythonrun.h" // _Py_SourceAsString()
#include "pycore_symtable.h" // struct symtable
#include "clinic/symtablemodule.c.h"
<ClInclude Include="..\Include\internal\pycore_pymem.h" />
<ClInclude Include="..\Include\internal\pycore_pymem_init.h" />
<ClInclude Include="..\Include\internal\pycore_pystate.h" />
+ <ClInclude Include="..\Include\internal\pycore_pythonrun.h" />
<ClInclude Include="..\Include\internal\pycore_pythread.h" />
<ClInclude Include="..\Include\internal\pycore_range.h" />
<ClInclude Include="..\Include\internal\pycore_runtime.h" />
<ClInclude Include="..\Include\internal\pycore_pystate.h">
<Filter>Include\internal</Filter>
</ClInclude>
+ <ClInclude Include="..\Include\internal\pycore_pythonrun.h">
+ <Filter>Include\internal</Filter>
+ </ClInclude>
<ClInclude Include="..\Include\internal\pycore_pythread.h">
<Filter>Include\internal</Filter>
</ClInclude>
#include "pycore_object.h" // _Py_AddToAllObjects()
#include "pycore_pyerrors.h" // _PyErr_NoMemory()
#include "pycore_pystate.h" // _PyThreadState_GET()
+#include "pycore_pythonrun.h" // _Py_SourceAsString()
#include "pycore_sysmodule.h" // _PySys_GetAttr()
#include "pycore_tuple.h" // _PyTuple_FromArray()
#include "pycore_pyerrors.h" // _PyErr_GetRaisedException, _Py_Offer_Suggestions
#include "pycore_pylifecycle.h" // _Py_UnhandledKeyboardInterrupt
#include "pycore_pystate.h" // _PyInterpreterState_GET()
+#include "pycore_pythonrun.h" // define _PyRun_InteractiveLoopObject()
#include "pycore_sysmodule.h" // _PySys_Audit()
#include "pycore_traceback.h" // _PyTraceBack_Print_Indented()