MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / __Pyx_ListComp_Append

Function __Pyx_ListComp_Append

eval/CIPO_evaluation/pycocotools/_mask.c:1501–1511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1499/* ListCompAppend.proto */
1500#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1501static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1502 PyListObject* L = (PyListObject*) list;
1503 Py_ssize_t len = Py_SIZE(list);
1504 if (likely(L->allocated > len)) {
1505 Py_INCREF(x);
1506 PyList_SET_ITEM(list, len, x);
1507 __Pyx_SET_SIZE(list, len + 1);
1508 return 0;
1509 }
1510 return PyList_Append(list, x);
1511}
1512#else
1513#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1514#endif

Calls

no outgoing calls

Tested by

no test coverage detected