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

Function SwigPyObject_repr

swig/python/export_wrap.cpp:1572–1593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1570SwigPyObject_repr(SwigPyObject *v)
1571#else
1572SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1573#endif
1574{
1575 const char *name = SWIG_TypePrettyName(v->ty);
1576 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, (void *)v);
1577 if (v->next) {
1578# ifdef METH_NOARGS
1579 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1580# else
1581 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1582# endif
1583# if PY_VERSION_HEX >= 0x03000000
1584 PyObject *joined = PyUnicode_Concat(repr, nrep);
1585 Py_DecRef(repr);
1586 Py_DecRef(nrep);
1587 repr = joined;
1588# else
1589 PyString_ConcatAndDel(&repr,nrep);
1590# endif
1591 }
1592 return repr;
1593}
1594
1595SWIGRUNTIME int
1596SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))

Callers 1

SwigPyObject_printFunction · 0.85

Calls 1

SWIG_TypePrettyNameFunction · 0.85

Tested by

no test coverage detected