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

Function __Pyx_PyObject_FastCallDict

fairseq/fairseq/data/data_utils_fast.cpp:25190–25248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25188}
25189#endif
25190static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
25191 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
25192#if CYTHON_COMPILING_IN_CPYTHON
25193 if (nargs == 0 && kwargs == NULL) {
25194 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
25195 return __Pyx_PyObject_CallMethO(func, NULL);
25196 }
25197 else if (nargs == 1 && kwargs == NULL) {
25198 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
25199 return __Pyx_PyObject_CallMethO(func, args[0]);
25200 }
25201#endif
25202 #if PY_VERSION_HEX < 0x030800B1
25203 #if CYTHON_FAST_PYCCALL
25204 if (PyCFunction_Check(func)) {
25205 if (kwargs) {
25206 return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
25207 } else {
25208 return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
25209 }
25210 }
25211 #if PY_VERSION_HEX >= 0x030700A1
25212 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
25213 return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
25214 }
25215 #endif
25216 #endif
25217 #if CYTHON_FAST_PYCALL
25218 if (PyFunction_Check(func)) {
25219 return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
25220 }
25221 #endif
25222 #endif
25223 if (kwargs == NULL) {
25224 #if CYTHON_VECTORCALL
25225 #if PY_VERSION_HEX < 0x03090000
25226 vectorcallfunc f = _PyVectorcall_Function(func);
25227 #else
25228 vectorcallfunc f = PyVectorcall_Function(func);
25229 #endif
25230 if (f) {
25231 return f(func, args, (size_t)nargs, NULL);
25232 }
25233 #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
25234 if (__Pyx_CyFunction_CheckExact(func)) {
25235 __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
25236 if (f) return f(func, args, (size_t)nargs, NULL);
25237 }
25238 #endif
25239 }
25240 if (nargs == 0) {
25241 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
25242 }
25243 #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
25244 return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
25245 #else
25246 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
25247 #endif

Callers

nothing calls this directly

Calls 3

__Pyx_PyObject_CallMethOFunction · 0.70
__Pyx_PyObject_CallFunction · 0.70

Tested by

no test coverage detected