MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / PyFrame_GetVarString

Function PyFrame_GetVarString

asyncpg/protocol/record/pythoncapi_compat.h:276–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274// gh-91248 added PyFrame_GetVarString() to Python 3.12.0a2
275#if PY_VERSION_HEX < 0x030C00A2 && !defined(PYPY_VERSION)
276static inline PyObject*
277PyFrame_GetVarString(PyFrameObject *frame, const char *name)
278{
279 PyObject *name_obj, *value;
280#if PY_VERSION_HEX >= 0x03000000
281 name_obj = PyUnicode_FromString(name);
282#else
283 name_obj = PyString_FromString(name);
284#endif
285 if (name_obj == NULL) {
286 return NULL;
287 }
288 value = PyFrame_GetVar(frame, name_obj);
289 Py_DECREF(name_obj);
290 return value;
291}
292#endif
293
294

Callers

nothing calls this directly

Calls 1

PyFrame_GetVarFunction · 0.85

Tested by

no test coverage detected