blob: adff7315681e369f7046c7572614def7b94a748e [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
Pablo Galindo2b74c832020-04-27 18:02:07 +010014PyAPI_FUNC(mod_ty) PyPegen_ASTFromFile(const char *filename, int mode, PyCompilerFlags*, PyArena *arena);
Pablo Galindoc5fc1562020-04-22 23:29:27 +010015PyAPI_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,
Pablo Galindo2b74c832020-04-27 18:02:07 +010021 const char *ps2, PyCompilerFlags *flags,
22 int *errcode, PyArena *arena);
23PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromFile(const char *filename, int mode, PyCompilerFlags *flags);
Pablo Galindoc5fc1562020-04-22 23:29:27 +010024PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromString(const char *str, int mode,
25 PyCompilerFlags *flags);
26PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromFileObject(FILE *, PyObject *filename_ob,
Pablo Galindo2b74c832020-04-27 18:02:07 +010027 int mode,
Pablo Galindoc5fc1562020-04-22 23:29:27 +010028 const char *ps1,
29 const char *ps2,
Pablo Galindo2b74c832020-04-27 18:02:07 +010030 PyCompilerFlags *flags,
31 const char *enc,
Pablo Galindoc5fc1562020-04-22 23:29:27 +010032 int *errcode);
33
34#ifdef __cplusplus
35}
36#endif
37#endif /* !Py_PEGENINTERFACE*/