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

Function SWIG_Python_AppendOutput

cvxpy/cvxcore/python/cvxcore_wrap.cxx:1231–1253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1229/* Append a value to the result obj */
1230
1231SWIGINTERN PyObject*
1232SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1233 if (!result) {
1234 result = obj;
1235 } else if (result == Py_None) {
1236 Py_DECREF(result);
1237 result = obj;
1238 } else {
1239 if (!PyList_Check(result)) {
1240 PyObject *o2 = result;
1241 result = PyList_New(1);
1242 if (result) {
1243 PyList_SET_ITEM(result, 0, o2);
1244 } else {
1245 Py_DECREF(obj);
1246 return o2;
1247 }
1248 }
1249 PyList_Append(result,obj);
1250 Py_DECREF(obj);
1251 }
1252 return result;
1253}
1254
1255/* Unpack the argument tuple */
1256

Callers 3

_wrap_ProblemData_getVFunction · 0.85
_wrap_ProblemData_getIFunction · 0.85
_wrap_ProblemData_getJFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected