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

Function SWIG_Python_AppendOutput

src/MeCab/MeCab_wrap.cpp:1180–1197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178/* Append a value to the result obj */
1179
1180SWIGINTERN PyObject*
1181SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1182 if (!result) {
1183 result = obj;
1184 } else if (result == Py_None) {
1185 Py_DECREF(result);
1186 result = obj;
1187 } else {
1188 if (!PyList_Check(result)) {
1189 PyObject *o2 = result;
1190 result = PyList_New(1);
1191 PyList_SetItem(result, 0, o2);
1192 }
1193 PyList_Append(result,obj);
1194 Py_DECREF(obj);
1195 }
1196 return result;
1197}
1198
1199/* Unpack the argument tuple */
1200

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected