mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-25 06:05: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>
31 lines
899 B
C
31 lines
899 B
C
#ifndef Ty_CPYTHON_IMPORT_H
|
|
# error "this header file must not be included directly"
|
|
#endif
|
|
|
|
struct _inittab {
|
|
const char *name; /* ASCII encoded string */
|
|
TyObject* (*initfunc)(void);
|
|
};
|
|
// This is not used after Ty_Initialize() is called.
|
|
PyAPI_DATA(struct _inittab *) TyImport_Inittab;
|
|
PyAPI_FUNC(int) TyImport_ExtendInittab(struct _inittab *newtab);
|
|
|
|
struct _frozen {
|
|
const char *name; /* ASCII encoded string */
|
|
const unsigned char *code;
|
|
int size;
|
|
int is_package;
|
|
};
|
|
|
|
/* Embedding apps may change this pointer to point to their favorite
|
|
collection of frozen modules: */
|
|
|
|
PyAPI_DATA(const struct _frozen *) TyImport_FrozenModules;
|
|
|
|
PyAPI_FUNC(TyObject*) TyImport_ImportModuleAttr(
|
|
TyObject *mod_name,
|
|
TyObject *attr_name);
|
|
PyAPI_FUNC(TyObject*) TyImport_ImportModuleAttrString(
|
|
const char *mod_name,
|
|
const char *attr_name);
|