MCPcopy Create free account
hub / github.com/cvxpy/cvxpy / SwigPyObject_format

Function SwigPyObject_format

cvxpy/cvxcore/python/cvxcore_wrap.cxx:1737–1760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1735}
1736
1737SWIGRUNTIME PyObject *
1738SwigPyObject_format(const char* fmt, SwigPyObject *v)
1739{
1740 PyObject *res = NULL;
1741 PyObject *args = PyTuple_New(1);
1742 if (args) {
1743 PyObject *val = SwigPyObject_long(v);
1744 if (val) {
1745 PyObject *ofmt;
1746 PyTuple_SET_ITEM(args, 0, val);
1747 ofmt = SWIG_Python_str_FromChar(fmt);
1748 if (ofmt) {
1749#if PY_VERSION_HEX >= 0x03000000
1750 res = PyUnicode_Format(ofmt,args);
1751#else
1752 res = PyString_Format(ofmt,args);
1753#endif
1754 Py_DECREF(ofmt);
1755 }
1756 }
1757 Py_DECREF(args);
1758 }
1759 return res;
1760}
1761
1762SWIGRUNTIME PyObject *
1763SwigPyObject_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