MCPcopy Create free account
hub / github.com/SamuraiT/mecab-python3 / SWIG_Python_SetModule

Function SWIG_Python_SetModule

src/MeCab/MeCab_wrap.cpp:2420–2435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2418}
2419
2420SWIGRUNTIME void
2421SWIG_Python_SetModule(swig_module_info *swig_module) {
2422#if PY_VERSION_HEX >= 0x03000000
2423 /* Add a dummy module object into sys.modules */
2424 PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2425#else
2426 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2427 PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2428#endif
2429 PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2430 if (pointer && module) {
2431 PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2432 } else {
2433 Py_XDECREF(pointer);
2434 }
2435}
2436
2437/* The python cached type query */
2438SWIGRUNTIME PyObject *

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected