MCPcopy Create free account
hub / github.com/chokkan/crfsuite / SwigPyObject_format

Function SwigPyObject_format

swig/python/export_wrap.cpp:1534–1554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1532}
1533
1534SWIGRUNTIME PyObject *
1535SwigPyObject_format(const char* fmt, SwigPyObject *v)
1536{
1537 PyObject *res = NULL;
1538 PyObject *args = PyTuple_New(1);
1539 if (args) {
1540 if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1541 PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1542 if (ofmt) {
1543#if PY_VERSION_HEX >= 0x03000000
1544 res = PyUnicode_Format(ofmt,args);
1545#else
1546 res = PyString_Format(ofmt,args);
1547#endif
1548 Py_DECREF(ofmt);
1549 }
1550 Py_DECREF(args);
1551 }
1552 }
1553 return res;
1554}
1555
1556SWIGRUNTIME PyObject *
1557SwigPyObject_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