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

Function SwigPyBuiltin_destructor_closure

src/MeCab/MeCab_wrap.cpp:3067–3090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3065 SwigPyBuiltin_destructor_closure(wrapper, #wrapper, a); \
3066}
3067SWIGINTERN void
3068SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) {
3069 SwigPyObject *sobj;
3070 sobj = (SwigPyObject *)a;
3071 Py_XDECREF(sobj->dict);
3072 if (sobj->own) {
3073 PyObject *o;
3074 PyObject *type = 0, *value = 0, *traceback = 0;
3075 PyErr_Fetch(&type, &value, &traceback);
3076 o = wrapper(a, NULL);
3077 if (!o) {
3078 PyObject *deallocname = PyString_FromString(wrappername);
3079 PyErr_WriteUnraisable(deallocname);
3080 Py_DECREF(deallocname);
3081 }
3082 PyErr_Restore(type, value, traceback);
3083 Py_XDECREF(o);
3084 }
3085 if (PyType_IS_GC(a->ob_type)) {
3086 PyObject_GC_Del(a);
3087 } else {
3088 PyObject_Del(a);
3089 }
3090}
3091
3092#define SWIGPY_INQUIRY_CLOSURE(wrapper) \
3093SWIGINTERN int \

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected