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

Function SWIG_Python_MustGetPtr

src/MeCab/MeCab_wrap.cpp:2561–2574  ·  view source on GitHub ↗

Convert a pointer value, signal an exception on a type mismatch */

Source from the content-addressed store, hash-verified

2559
2560/* Convert a pointer value, signal an exception on a type mismatch */
2561SWIGRUNTIME void *
2562SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2563 void *result;
2564 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2565 PyErr_Clear();
2566#if SWIG_POINTER_EXCEPTION
2567 if (flags) {
2568 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2569 SWIG_Python_ArgFail(argnum);
2570 }
2571#endif
2572 }
2573 return result;
2574}
2575
2576#ifdef SWIGPYTHON_BUILTIN
2577SWIGRUNTIME int

Callers

nothing calls this directly

Calls 3

SWIG_Python_TypeErrorFunction · 0.85
SWIG_TypePrettyNameFunction · 0.85
SWIG_Python_ArgFailFunction · 0.85

Tested by

no test coverage detected