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

Function SwigPyObject_format

src/MeCab/MeCab_wrap.cpp:1406–1426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1404}
1405
1406SWIGRUNTIME PyObject *
1407SwigPyObject_format(const char* fmt, SwigPyObject *v)
1408{
1409 PyObject *res = NULL;
1410 PyObject *args = PyTuple_New(1);
1411 if (args) {
1412 if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1413 PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1414 if (ofmt) {
1415#if PY_VERSION_HEX >= 0x03000000
1416 res = PyUnicode_Format(ofmt,args);
1417#else
1418 res = PyString_Format(ofmt,args);
1419#endif
1420 Py_DECREF(ofmt);
1421 }
1422 Py_DECREF(args);
1423 }
1424 }
1425 return res;
1426}
1427
1428SWIGRUNTIME PyObject *
1429SwigPyObject_oct(SwigPyObject *v)

Callers 2

SwigPyObject_octFunction · 0.85
SwigPyObject_hexFunction · 0.85

Calls 2

SwigPyObject_longFunction · 0.85
SWIG_Python_str_FromCharFunction · 0.85

Tested by

no test coverage detected