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

Function SWIG_PyInstanceMethod_New

src/MeCab/MeCab_wrap.cpp:9886–9898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9884 * ----------------------------------------------------------------------------- */
9885
9886 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
9887 if (PyCFunction_Check(func)) {
9888 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
9889 PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
9890 if (ml)
9891 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
9892 }
9893#if PY_VERSION_HEX >= 0x03000000
9894 return PyInstanceMethod_New(func);
9895#else
9896 return PyMethod_New(func, NULL, NULL);
9897#endif
9898 }
9899
9900 /* -----------------------------------------------------------------------------
9901 * Wrapper of PyStaticMethod_New()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected