Lines Matching defs:module

1 /* pickle accelerator C extensor: _pickle module.
3 * It is built as a built-in module (Py_BUILD_CORE_BUILTIN define) on Windows
4 * and as an extension module (Py_BUILD_CORE_MODULE define) on other
21 "Optimized C implementation for the Python pickle module.");
24 module _pickle
152 /* State of the pickle module, per PEP 3121. */
191 /* Forward declaration of the _pickle module definition. */
194 /* Given a module object, get its per-module state. */
196 _Pickle_GetState(PyObject *module)
198 return (PickleState *)_PyModule_GetState(module);
201 /* Find the module instance imported in the currently running sub-interpreter
209 /* Clear the given pickle module state. */
229 /* Initialize the given pickle module state. */
285 /* Load the 2.x -> 3.x stdlib module mapping tables */
1888 _checkmodule(PyObject *module_name, PyObject *module,
1891 if (module == Py_None) {
1899 PyObject *candidate = get_deep_attribute(module, dotted_path, NULL);
1915 PyObject *module = NULL;
1925 the module of global. */
1941 while (PyDict_Next(modules, &i, &module_name, &module)) {
1942 if (_checkmodule(module_name, module, global, dotted_path) == 0) {
1957 module = PyObject_GetItem(modules, module_name);
1958 if (module == NULL) {
1963 if (_checkmodule(module_name, module, global, dotted_path) == 0) {
1964 Py_DECREF(module);
1968 Py_DECREF(module);
1978 /* If no module is found, use __main__. */
3606 PyObject *module = NULL;
3630 dotted_path = get_dotted_path(module, global_name);
3645 module = PyImport_Import(module_name);
3646 if (module == NULL) {
3648 "Can't pickle %R: import of module %R failed",
3654 cls = get_deep_attribute(module, dotted_path, &parent);
3742 if (parent == module) {
3758 else if (parent != module) {
3780 so, we convert module names to the old 2.x module names. */
3788 both the module name and the global name using UTF-8. We do so
3802 "can't pickle module identifier '%S' using "
3816 /* Save the name of the module. */
3846 Py_XDECREF(module);
4717 to map the new Python 3 names to the old module names used in Python
7022 Return an object from a specified module.
7024 If necessary, the module will be imported. Subclasses may override
7039 PyObject *module;
7055 or moved to another module. */
7084 /* Check if the module was renamed. */
7105 module = PyImport_Import(module_name);
7106 if (module == NULL) {
7109 global = getattribute(module, global_name, self->proto >= 4);
7110 Py_DECREF(module);
7666 to map the new Python 3 names to the old module names used in Python
7676 _pickle_dump_impl(PyObject *module, PyObject *obj, PyObject *file,
7731 try to map the new Python 3 names to the old module names used in
7741 _pickle_dumps_impl(PyObject *module, PyObject *obj, PyObject *protocol,
7806 _pickle_load_impl(PyObject *module, PyObject *file, int fix_imports,
7866 _pickle_loads_impl(PyObject *module, PyObject *data, int fix_imports,
7970 /* Create the module and add the functions. */