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

Function SwigPyObject_New

cvxpy/cvxcore/python/cvxcore_wrap.cxx:2173–2193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2171}
2172
2173SWIGRUNTIME PyObject *
2174SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
2175{
2176 SwigPyObject *sobj = PyObject_New(SwigPyObject, SwigPyObject_type());
2177 if (sobj) {
2178 sobj->ptr = ptr;
2179 sobj->ty = ty;
2180 sobj->own = own;
2181 sobj->next = 0;
2182#ifdef SWIGPYTHON_BUILTIN
2183 sobj->dict = 0;
2184#endif
2185 if (own == SWIG_POINTER_OWN) {
2186 /* Obtain a reference to the Python capsule wrapping the module information, so that the
2187 * module information is correctly destroyed after all SWIG python objects have been freed
2188 * by the GC (and corresponding destructors invoked) */
2189 Py_XINCREF(Swig_Capsule_global);
2190 }
2191 }
2192 return (PyObject *)sobj;
2193}
2194
2195/* -----------------------------------------------------------------------------
2196 * Implements a simple Swig Packed type, and use it instead of string

Callers 2

SwigPyObject_deallocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected