MCPcopy Create free account
hub / github.com/chokkan/crfsuite / SWIG_Python_SetSwigThis

Function SWIG_Python_SetSwigThis

swig/python/export_wrap.cpp:2518–2537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2516}
2517
2518SWIGRUNTIME void
2519SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2520{
2521 PyObject *dict;
2522#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2523 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2524 if (dictptr != NULL) {
2525 dict = *dictptr;
2526 if (dict == NULL) {
2527 dict = PyDict_New();
2528 *dictptr = dict;
2529 }
2530 PyDict_SetItem(dict, SWIG_This(), swig_this);
2531 return;
2532 }
2533#endif
2534 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2535 PyDict_SetItem(dict, SWIG_This(), swig_this);
2536 Py_DECREF(dict);
2537}
2538
2539
2540SWIGINTERN PyObject *

Callers 1

Calls 1

SWIG_ThisFunction · 0.85

Tested by

no test coverage detected