#ifndef Py_BUILD_CORE_BUILTIN
#define Py_BUILD_CORE_MODULE …
#endif
#include "Python.h"
#include "pycore_modsupport.h"
#include "pycore_namespace.h"
meth_state;
ExampleObject;
testmultiphase_state;
StateAccessTypeObject;
static int
Example_traverse(ExampleObject *self, visitproc visit, void *arg)
{ … }
static void
Example_finalize(ExampleObject *self)
{ … }
static PyObject *
Example_demo(ExampleObject *self, PyObject *args)
{ … }
#include "clinic/_testmultiphase.c.h"
static PyMethodDef Example_methods[] = …;
static PyObject *
Example_getattro(ExampleObject *self, PyObject *name)
{ … }
static int
Example_setattr(ExampleObject *self, const char *name, PyObject *v)
{ … }
static PyType_Slot Example_Type_slots[] = …;
static PyType_Spec Example_Type_spec = …;
static PyModuleDef def_meth_state_access;
static PyModuleDef def_nonmodule;
static PyModuleDef def_nonmodule_with_methods;
static PyObject *
_testmultiphase_StateAccessType_get_defining_module_impl(StateAccessTypeObject *self,
PyTypeObject *cls)
{ … }
static PyObject *
_testmultiphase_StateAccessType_getmodulebydef_bad_def_impl(StateAccessTypeObject *self,
PyTypeObject *cls)
{ … }
static PyObject *
_testmultiphase_StateAccessType_increment_count_clinic_impl(StateAccessTypeObject *self,
PyTypeObject *cls,
int n, int twice)
{ … }
PyDoc_STRVAR(_StateAccessType_decrement_count__doc__,
"decrement_count($self, /, n=1, *, twice=None)\n"
"--\n"
"\n"
"Add 'n' from the module-state counter.\n"
"Pass 'twice' to double that amount.\n"
"(This is to test both positional and keyword arguments.");
static PyObject *
_StateAccessType_increment_count_noclinic(StateAccessTypeObject *self,
PyTypeObject *defining_class,
PyObject *const *args,
Py_ssize_t nargs,
PyObject *kwnames)
{ … }
static PyObject *
_testmultiphase_StateAccessType_get_count_impl(StateAccessTypeObject *self,
PyTypeObject *cls)
{ … }
static PyMethodDef StateAccessType_methods[] = …;
static PyType_Slot StateAccessType_Type_slots[] = …;
static PyType_Spec StateAccessType_spec = …;
PyDoc_STRVAR(testexport_foo_doc,
"foo(i,j)\n\
\n\
Return the sum of i and j.");
static PyObject *
testexport_foo(PyObject *self, PyObject *args)
{ … }
PyDoc_STRVAR(call_state_registration_func_doc,
"register_state(0): call PyState_FindModule()\n\
register_state(1): call PyState_AddModule()\n\
register_state(2): call PyState_RemoveModule()");
static PyObject *
call_state_registration_func(PyObject *mod, PyObject *args)
{ … }
static PyType_Slot Str_Type_slots[] = …;
static PyType_Spec Str_Type_spec = …;
static PyMethodDef testexport_methods[] = …;
static int execfunc(PyObject *m)
{ … }
#define TEST_MODULE_DEF(name, slots, methods) …
static PyModuleDef_Slot main_slots[] = …;
static PyModuleDef main_def = …;
PyMODINIT_FUNC
PyInit__testmultiphase(void)
{ … }
static PyObject*
createfunc_nonmodule(PyObject *spec, PyModuleDef *def)
{ … }
static PyModuleDef_Slot slots_create_nonmodule[] = …;
static PyModuleDef def_nonmodule = …;
PyMODINIT_FUNC
PyInit__testmultiphase_nonmodule(void)
{ … }
PyDoc_STRVAR(nonmodule_bar_doc,
"bar(i,j)\n\
\n\
Return the difference of i - j.");
static PyObject *
nonmodule_bar(PyObject *self, PyObject *args)
{ … }
static PyMethodDef nonmodule_methods[] = …;
static PyModuleDef def_nonmodule_with_methods = …;
PyMODINIT_FUNC
PyInit__testmultiphase_nonmodule_with_methods(void)
{ … }
static PyModuleDef_Slot nonascii_slots[] = …;
static PyModuleDef def_nonascii_latin = …;
PyMODINIT_FUNC
PyInitU__testmultiphase_zkouka_naten_evc07gi8e(void)
{ … }
static PyModuleDef def_nonascii_kana = …;
PyMODINIT_FUNC
PyInitU_eckzbwbhc6jpgzcx415x(void)
{ … }
PyMODINIT_FUNC
PyInit_x(void)
{ … }
static PyModuleDef null_slots_def = …;
PyMODINIT_FUNC
PyInit__testmultiphase_null_slots(void)
{ … }
static PyModuleDef_Slot slots_bad_large[] = …;
static PyModuleDef def_bad_large = …;
PyMODINIT_FUNC
PyInit__testmultiphase_bad_slot_large(void)
{ … }
static PyModuleDef_Slot slots_bad_negative[] = …;
static PyModuleDef def_bad_negative = …;
PyMODINIT_FUNC
PyInit__testmultiphase_bad_slot_negative(void)
{ … }
static PyModuleDef def_create_int_with_state = …;
PyMODINIT_FUNC
PyInit__testmultiphase_create_int_with_state(void)
{ … }
static PyModuleDef def_negative_size = …;
PyMODINIT_FUNC
PyInit__testmultiphase_negative_size(void)
{ … }
static PyModuleDef uninitialized_def = …;
PyMODINIT_FUNC
PyInit__testmultiphase_export_uninitialized(void)
{ … }
PyMODINIT_FUNC
PyInit__testmultiphase_export_null(void)
{ … }
PyMODINIT_FUNC
PyInit__testmultiphase_export_raise(void)
{ … }
PyMODINIT_FUNC
PyInit__testmultiphase_export_unreported_exception(void)
{ … }
static PyObject*
createfunc_noop(PyObject *spec, PyModuleDef *def)
{ … }
static PyModuleDef_Slot slots_multiple_create_slots[] = …;
static PyModuleDef def_multiple_create_slots = …;
PyMODINIT_FUNC
PyInit__testmultiphase_multiple_create_slots(void)
{ … }
static PyObject*
createfunc_null(PyObject *spec, PyModuleDef *def)
{ … }
static PyModuleDef_Slot slots_create_null[] = …;
static PyModuleDef def_create_null = …;
PyMODINIT_FUNC
PyInit__testmultiphase_create_null(void)
{ … }
static PyObject*
createfunc_raise(PyObject *spec, PyModuleDef *def)
{ … }
static PyModuleDef_Slot slots_create_raise[] = …;
static PyModuleDef def_create_raise = …;
PyMODINIT_FUNC
PyInit__testmultiphase_create_raise(void)
{ … }
static PyObject*
createfunc_unreported_exception(PyObject *spec, PyModuleDef *def)
{ … }
static PyModuleDef_Slot slots_create_unreported_exception[] = …;
static PyModuleDef def_create_unreported_exception = …;
PyMODINIT_FUNC
PyInit__testmultiphase_create_unreported_exception(void)
{ … }
static PyModuleDef_Slot slots_nonmodule_with_exec_slots[] = …;
static PyModuleDef def_nonmodule_with_exec_slots = …;
PyMODINIT_FUNC
PyInit__testmultiphase_nonmodule_with_exec_slots(void)
{ … }
static int
execfunc_err(PyObject *mod)
{ … }
static PyModuleDef_Slot slots_exec_err[] = …;
static PyModuleDef def_exec_err = …;
PyMODINIT_FUNC
PyInit__testmultiphase_exec_err(void)
{ … }
static int
execfunc_raise(PyObject *spec)
{ … }
static PyModuleDef_Slot slots_exec_raise[] = …;
static PyModuleDef def_exec_raise = …;
PyMODINIT_FUNC
PyInit__testmultiphase_exec_raise(void)
{ … }
static int
execfunc_unreported_exception(PyObject *mod)
{ … }
static PyModuleDef_Slot slots_exec_unreported_exception[] = …;
static PyModuleDef def_exec_unreported_exception = …;
PyMODINIT_FUNC
PyInit__testmultiphase_exec_unreported_exception(void)
{ … }
static int
meth_state_access_exec(PyObject *m)
{ … }
static PyModuleDef_Slot meth_state_access_slots[] = …;
static PyModuleDef def_meth_state_access = …;
PyMODINIT_FUNC
PyInit__testmultiphase_meth_state_access(void)
{ … }
static PyModuleDef def_module_state_shared = …;
PyMODINIT_FUNC
PyInit__test_module_state_shared(void)
{ … }
static PyModuleDef_Slot slots_multiple_multiple_interpreters_slots[] = …;
static PyModuleDef def_multiple_multiple_interpreters_slots = …;
PyMODINIT_FUNC
PyInit__testmultiphase_multiple_multiple_interpreters_slots(void)
{ … }
static PyModuleDef_Slot non_isolated_slots[] = …;
static PyModuleDef non_isolated_def = …;
PyMODINIT_FUNC
PyInit__test_non_isolated(void)
{ … }
static PyModuleDef_Slot shared_gil_only_slots[] = …;
static PyModuleDef shared_gil_only_def = …;
PyMODINIT_FUNC
PyInit__test_shared_gil_only(void)
{ … }