bpo-40939: Rename PyPegen* functions to PyParser* (GH-21016)

Rename PyPegen* functions to PyParser*, so that we can remove the
old set of PyParser* functions that were using the old parser.
This commit is contained in:
Lysandros Nikolaou 2020-06-22 02:47:46 +03:00 committed by GitHub
parent 6989af0bc7
commit 564cd18767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 53 additions and 80 deletions

View file

@ -0,0 +1,52 @@
#ifndef Py_PEGENINTERFACE
#define Py_PEGENINTERFACE
#ifdef __cplusplus
extern "C" {
#endif
#include "Python.h"
#ifndef Py_LIMITED_API
PyAPI_FUNC(struct _mod *) PyParser_ASTFromString(
const char *str,
const char *filename,
int mode,
PyCompilerFlags *flags,
PyArena *arena);
PyAPI_FUNC(struct _mod *) PyParser_ASTFromStringObject(
const char *str,
PyObject* filename,
int mode,
PyCompilerFlags *flags,
PyArena *arena);
PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(
FILE *fp,
const char *filename,
const char* enc,
int mode,
const char *ps1,
const char *ps2,
PyCompilerFlags *flags,
int *errcode,
PyArena *arena);
PyAPI_FUNC(struct _mod *) PyParser_ASTFromFileObject(
FILE *fp,
PyObject *filename_ob,
const char *enc,
int mode,
const char *ps1,
const char *ps2,
PyCompilerFlags *flags,
int *errcode,
PyArena *arena);
PyAPI_FUNC(struct _mod *) PyParser_ASTFromFilename(
const char *filename,
int mode,
PyCompilerFlags *flags,
PyArena *arena);
#endif /* !Py_LIMITED_API */
#ifdef __cplusplus
}
#endif
#endif /* !Py_PEGENINTERFACE */