mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-24 13:45:05 +00:00
Massive automated renaming of all Py_/PyObject/etc. prefixes to Ty_/TyObject/etc. This includes: - All public API types (TyObject, TyTypeObject, etc.) - All public API functions (Ty_Initialize, Ty_BuildValue, etc.) - All internal API (_Ty_ prefixes) - Reference counting macros (Ty_INCREF, Ty_DECREF, etc.) - Type flags (Ty_TPFLAGS_*) - Debug flags (Ty_DEBUG, Ty_TRACE_REFS, etc.) - All object type APIs (TyList_, TyDict_, TyUnicode_, etc.) This changes over 60,000 occurrences across 1000+ files. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
40 lines
1.4 KiB
C
40 lines
1.4 KiB
C
#include "Python.h"
|
|
|
|
#include "pegen.h"
|
|
|
|
mod_ty
|
|
_TyParser_ASTFromString(const char *str, TyObject* filename, int mode,
|
|
PyCompilerFlags *flags, PyArena *arena)
|
|
{
|
|
if (TySys_Audit("compile", "yO", str, filename) < 0) {
|
|
return NULL;
|
|
}
|
|
|
|
mod_ty result = _TyPegen_run_parser_from_string(str, mode, filename, flags, arena);
|
|
return result;
|
|
}
|
|
|
|
mod_ty
|
|
_TyParser_ASTFromFile(FILE *fp, TyObject *filename_ob, const char *enc,
|
|
int mode, const char *ps1, const char* ps2,
|
|
PyCompilerFlags *flags, int *errcode, PyArena *arena)
|
|
{
|
|
if (TySys_Audit("compile", "OO", Ty_None, filename_ob) < 0) {
|
|
return NULL;
|
|
}
|
|
return _TyPegen_run_parser_from_file_pointer(fp, mode, filename_ob, enc, ps1, ps2,
|
|
flags, errcode, NULL, arena);
|
|
}
|
|
|
|
mod_ty
|
|
_TyParser_InteractiveASTFromFile(FILE *fp, TyObject *filename_ob, const char *enc,
|
|
int mode, const char *ps1, const char* ps2,
|
|
PyCompilerFlags *flags, int *errcode,
|
|
TyObject **interactive_src, PyArena *arena)
|
|
{
|
|
if (TySys_Audit("compile", "OO", Ty_None, filename_ob) < 0) {
|
|
return NULL;
|
|
}
|
|
return _TyPegen_run_parser_from_file_pointer(fp, mode, filename_ob, enc, ps1, ps2,
|
|
flags, errcode, interactive_src, arena);
|
|
} |