MCPcopy Create free account
hub / github.com/Sally-SH/VSP-LLM / __Pyx_SetVtable

Function __Pyx_SetVtable

fairseq/fairseq/data/data_utils_fast.cpp:27709–27724  ·  view source on GitHub ↗

SetVTable */

Source from the content-addressed store, hash-verified

27707
27708/* SetVTable */
27709 static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
27710 PyObject *ob = PyCapsule_New(vtable, 0, 0);
27711 if (unlikely(!ob))
27712 goto bad;
27713#if CYTHON_COMPILING_IN_LIMITED_API
27714 if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
27715#else
27716 if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
27717#endif
27718 goto bad;
27719 Py_DECREF(ob);
27720 return 0;
27721bad:
27722 Py_XDECREF(ob);
27723 return -1;
27724}
27725
27726/* GetVTable */
27727 static void* __Pyx_GetVtable(PyTypeObject *type) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected