blob: d8621c1a8892743e98107db7c3d398e543720610 [file] [log] [blame]
Pablo Galindoc5fc1562020-04-22 23:29:27 +01001#ifndef Py_PEGENINTERFACE
2#define Py_PEGENINTERFACE
3#ifdef __cplusplus
4extern "C" {
5#endif
6
Lysandros Nikolaouebebb642020-04-23 18:36:06 +03007#ifndef Py_BUILD_CORE
8# error "this header requires Py_BUILD_CORE define"
9#endif
10
Pablo Galindoc5fc1562020-04-22 23:29:27 +010011#include "Python.h"
12#include "Python-ast.h"
13
14PyAPI_FUNC(mod_ty) PyPegen_ASTFromFile(const char *filename, int mode, PyArena *arena);
15PyAPI_FUNC(mod_ty) PyPegen_ASTFromString(const char *str, int mode, PyCompilerFlags *flags,
16 PyArena *arena);
17PyAPI_FUNC(mod_ty) PyPegen_ASTFromStringObject(const char *str, PyObject* filename, int mode,
18 PyCompilerFlags *flags, PyArena *arena);
19PyAPI_FUNC(mod_ty) PyPegen_ASTFromFileObject(FILE *fp, PyObject *filename_ob,
20 int mode, const char *enc, const char *ps1,
21 const char *ps2, int *errcode, PyArena *arena);
22PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromFile(const char *filename, int mode);
23PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromString(const char *str, int mode,
24 PyCompilerFlags *flags);
25PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromFileObject(FILE *, PyObject *filename_ob,
26 int mode, const char *enc,
27 const char *ps1,
28 const char *ps2,
29 int *errcode);
30
31#ifdef __cplusplus
32}
33#endif
34#endif /* !Py_PEGENINTERFACE*/