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>
97 lines
2.3 KiB
C
97 lines
2.3 KiB
C
/*
|
|
* Test the limited C API.
|
|
*
|
|
* The 'test_*' functions exported by this module are run as part of the
|
|
* standard Python regression test, via Lib/test/test_capi.py.
|
|
*/
|
|
|
|
#include "_testlimitedcapi/parts.h"
|
|
|
|
static TyMethodDef TestMethods[] = {
|
|
{NULL, NULL} /* sentinel */
|
|
};
|
|
|
|
static struct TyModuleDef _testlimitedcapimodule = {
|
|
PyModuleDef_HEAD_INIT,
|
|
.m_name = "_testlimitedcapi",
|
|
.m_size = 0,
|
|
.m_methods = TestMethods,
|
|
};
|
|
|
|
PyMODINIT_FUNC
|
|
PyInit__testlimitedcapi(void)
|
|
{
|
|
TyObject *mod = TyModule_Create(&_testlimitedcapimodule);
|
|
if (mod == NULL) {
|
|
return NULL;
|
|
}
|
|
#ifdef Ty_GIL_DISABLED
|
|
PyUnstable_Module_SetGIL(mod, Ty_MOD_GIL_NOT_USED);
|
|
#endif
|
|
|
|
if (_PyTestLimitedCAPI_Init_Abstract(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_ByteArray(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Bytes(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Codec(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Complex(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Dict(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Eval(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Float(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_HeaptypeRelative(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Import(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_List(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Long(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Object(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_PyOS(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Set(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Sys(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Tuple(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Unicode(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_VectorcallLimited(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_Version(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
if (_PyTestLimitedCAPI_Init_File(mod) < 0) {
|
|
return NULL;
|
|
}
|
|
return mod;
|
|
}
|