MCPcopy Create free account
hub / github.com/apache/cloudberry / object_to_string

Function object_to_string

src/pl/plpython/plpy_plpymodule.c:392–411  ·  view source on GitHub ↗

enforce cast of object to string */

Source from the content-addressed store, hash-verified

390
391/* enforce cast of object to string */
392static char *
393object_to_string(PyObject *obj)
394{
395 if (obj)
396 {
397 PyObject *so = PyObject_Str(obj);
398
399 if (so != NULL)
400 {
401 char *str;
402
403 str = pstrdup(PyString_AsString(so));
404 Py_DECREF(so);
405
406 return str;
407 }
408 }
409
410 return NULL;
411}
412
413static PyObject *
414PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw)

Callers 1

PLy_outputFunction · 0.85

Calls 1

pstrdupFunction · 0.50

Tested by

no test coverage detected