#include "Python.h"
#include "pycore_call.h"
#include "pycore_dict.h"
#include "pycore_fileutils.h"
#include "pycore_interp.h"
#include "pycore_long.h"
#include "pycore_modsupport.h"
#include "pycore_moduleobject.h"
#include "pycore_object.h"
#include "pycore_pyerrors.h"
#include "pycore_pystate.h"
#include "osdefs.h"
#define _PyModule_CAST(op) …
static PyMemberDef module_members[] = …;
PyTypeObject PyModuleDef_Type = …;
int
_PyModule_IsExtension(PyObject *obj)
{ … }
PyObject*
PyModuleDef_Init(PyModuleDef* def)
{ … }
static int
module_init_dict(PyModuleObject *mod, PyObject *md_dict,
PyObject *name, PyObject *doc)
{ … }
static PyModuleObject *
new_module_notrack(PyTypeObject *mt)
{ … }
static void
track_module(PyModuleObject *m)
{ … }
static PyObject *
new_module(PyTypeObject *mt, PyObject *args, PyObject *kws)
{ … }
PyObject *
PyModule_NewObject(PyObject *name)
{ … }
PyObject *
PyModule_New(const char *name)
{ … }
static int
check_api_version(const char *name, int module_api_version)
{ … }
static int
_add_methods_to_object(PyObject *module, PyObject *name, PyMethodDef *functions)
{ … }
PyObject *
PyModule_Create2(PyModuleDef* module, int module_api_version)
{ … }
PyObject *
_PyModule_CreateInitialized(PyModuleDef* module, int module_api_version)
{ … }
PyObject *
PyModule_FromDefAndSpec2(PyModuleDef* def, PyObject *spec, int module_api_version)
{ … }
#ifdef Py_GIL_DISABLED
int
PyUnstable_Module_SetGIL(PyObject *module, void *gil)
{
if (!PyModule_Check(module)) {
PyErr_BadInternalCall();
return -1;
}
((PyModuleObject *)module)->md_gil = gil;
return 0;
}
#endif
int
PyModule_ExecDef(PyObject *module, PyModuleDef *def)
{ … }
int
PyModule_AddFunctions(PyObject *m, PyMethodDef *functions)
{ … }
int
PyModule_SetDocString(PyObject *m, const char *doc)
{ … }
PyObject *
PyModule_GetDict(PyObject *m)
{ … }
PyObject*
PyModule_GetNameObject(PyObject *mod)
{ … }
const char *
PyModule_GetName(PyObject *m)
{ … }
PyObject*
PyModule_GetFilenameObject(PyObject *mod)
{ … }
const char *
PyModule_GetFilename(PyObject *m)
{ … }
PyModuleDef*
PyModule_GetDef(PyObject* m)
{ … }
void*
PyModule_GetState(PyObject* m)
{ … }
void
_PyModule_Clear(PyObject *m)
{ … }
void
_PyModule_ClearDict(PyObject *d)
{ … }
#include "clinic/moduleobject.c.h"
static int
module___init___impl(PyModuleObject *self, PyObject *name, PyObject *doc)
{ … }
static void
module_dealloc(PyObject *self)
{ … }
static PyObject *
module_repr(PyObject *self)
{ … }
int
_PyModuleSpec_IsInitializing(PyObject *spec)
{ … }
int
_PyModuleSpec_IsUninitializedSubmodule(PyObject *spec, PyObject *name)
{ … }
int
_PyModuleSpec_GetFileOrigin(PyObject *spec, PyObject **p_origin)
{ … }
int
_PyModule_IsPossiblyShadowing(PyObject *origin)
{ … }
PyObject*
_Py_module_getattro_impl(PyModuleObject *m, PyObject *name, int suppress)
{ … }
PyObject*
_Py_module_getattro(PyObject *self, PyObject *name)
{ … }
static int
module_traverse(PyObject *self, visitproc visit, void *arg)
{ … }
static int
module_clear(PyObject *self)
{ … }
static PyObject *
module_dir(PyObject *self, PyObject *args)
{ … }
static PyMethodDef module_methods[] = …;
static PyObject *
module_get_dict(PyModuleObject *m)
{ … }
static PyObject *
module_get_annotate(PyObject *self, void *Py_UNUSED(ignored))
{ … }
static int
module_set_annotate(PyObject *self, PyObject *value, void *Py_UNUSED(ignored))
{ … }
static PyObject *
module_get_annotations(PyObject *self, void *Py_UNUSED(ignored))
{ … }
static int
module_set_annotations(PyObject *self, PyObject *value, void *Py_UNUSED(ignored))
{ … }
static PyGetSetDef module_getsets[] = …;
PyTypeObject PyModule_Type = …;