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

Function SWIG_Python_SetSwigThis

src/MeCab/MeCab_wrap.cpp:2278–2297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2276}
2277
2278SWIGRUNTIME void
2279SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2280{
2281 PyObject *dict;
2282#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2283 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2284 if (dictptr != NULL) {
2285 dict = *dictptr;
2286 if (dict == NULL) {
2287 dict = PyDict_New();
2288 *dictptr = dict;
2289 }
2290 PyDict_SetItem(dict, SWIG_This(), swig_this);
2291 return;
2292 }
2293#endif
2294 dict = PyObject_GetAttrString(inst, "__dict__");
2295 PyDict_SetItem(dict, SWIG_This(), swig_this);
2296 Py_DECREF(dict);
2297}
2298
2299
2300SWIGINTERN PyObject *

Callers 1

Calls 1

SWIG_ThisFunction · 0.85

Tested by

no test coverage detected