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