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

Function PySys_GetAttr

asyncpg/protocol/record/pythoncapi_compat.h:2251–2264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2249}
2250
2251static inline PyObject*
2252PySys_GetAttr(PyObject *name)
2253{
2254#if PY_VERSION_HEX >= 0x03000000
2255 const char *name_str = PyUnicode_AsUTF8(name);
2256#else
2257 const char *name_str = PyString_AsString(name);
2258#endif
2259 if (name_str == NULL) {
2260 return NULL;
2261 }
2262
2263 return PySys_GetAttrString(name_str);
2264}
2265
2266static inline int
2267PySys_GetOptionalAttrString(const char *name, PyObject **value)

Callers

nothing calls this directly

Calls 1

PySys_GetAttrStringFunction · 0.85

Tested by

no test coverage detected