• Home
  • Raw
  • Download

Lines Matching +full:no +full:- +full:eq +full:- +full:null

13 static PyCFunctionObject *free_list = NULL;
36 return PyCFunction_NewEx(ml, self, NULL); in PyCFunction_New()
44 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS)) in PyCFunction_NewEx()
50 vectorcall = NULL; in PyCFunction_NewEx()
66 "%s() method: bad call flags", ml->ml_name); in PyCFunction_NewEx()
67 return NULL; in PyCFunction_NewEx()
72 if (op != NULL) { in PyCFunction_NewEx()
73 free_list = (PyCFunctionObject *)(op->m_self); in PyCFunction_NewEx()
75 numfree--; in PyCFunction_NewEx()
79 if (op == NULL) in PyCFunction_NewEx()
80 return NULL; in PyCFunction_NewEx()
82 op->m_weakreflist = NULL; in PyCFunction_NewEx()
83 op->m_ml = ml; in PyCFunction_NewEx()
85 op->m_self = self; in PyCFunction_NewEx()
87 op->m_module = module; in PyCFunction_NewEx()
88 op->vectorcall = vectorcall; in PyCFunction_NewEx()
98 return NULL; in PyCFunction_GetFunction()
108 return NULL; in PyCFunction_GetSelf()
118 return -1; in PyCFunction_GetFlags()
123 /* Methods (the standard built-in methods, that is) */
129 if (m->m_weakreflist != NULL) { in meth_dealloc()
132 Py_XDECREF(m->m_self); in meth_dealloc()
133 Py_XDECREF(m->m_module); in meth_dealloc()
135 m->m_self = (PyObject *)free_list; in meth_dealloc()
149 if (m->m_self == NULL || PyModule_Check(m->m_self)) in meth_reduce()
150 return PyUnicode_FromString(m->m_ml->ml_name); in meth_reduce()
153 m->m_self, m->m_ml->ml_name); in meth_reduce()
157 {"__reduce__", (PyCFunction)meth_reduce, METH_NOARGS, NULL},
158 {NULL, NULL}
164 return _PyType_GetTextSignatureFromInternalDoc(m->m_ml->ml_name, m->m_ml->ml_doc); in meth_get__text_signature__()
170 return _PyType_GetDocFromInternalDoc(m->m_ml->ml_name, m->m_ml->ml_doc); in meth_get__doc__()
176 return PyUnicode_FromString(m->m_ml->ml_name); in meth_get__name__()
182 /* If __self__ is a module or NULL, return m.__name__ in meth_get__qualname__()
193 if (m->m_self == NULL || PyModule_Check(m->m_self)) in meth_get__qualname__()
194 return PyUnicode_FromString(m->m_ml->ml_name); in meth_get__qualname__()
196 type = PyType_Check(m->m_self) ? m->m_self : (PyObject*)Py_TYPE(m->m_self); in meth_get__qualname__()
199 if (type_qualname == NULL) in meth_get__qualname__()
200 return NULL; in meth_get__qualname__()
206 return NULL; in meth_get__qualname__()
209 res = PyUnicode_FromFormat("%S.%s", type_qualname, m->m_ml->ml_name); in meth_get__qualname__()
217 Py_VISIT(m->m_self); in meth_traverse()
218 Py_VISIT(m->m_module); in meth_traverse()
228 if (self == NULL) in meth_get__self__()
235 {"__doc__", (getter)meth_get__doc__, NULL, NULL},
236 {"__name__", (getter)meth_get__name__, NULL, NULL},
237 {"__qualname__", (getter)meth_get__qualname__, NULL, NULL},
238 {"__self__", (getter)meth_get__self__, NULL, NULL},
239 {"__text_signature__", (getter)meth_get__text_signature__, NULL, NULL},
247 {NULL}
253 if (m->m_self == NULL || PyModule_Check(m->m_self)) in meth_repr()
254 return PyUnicode_FromFormat("<built-in function %s>", in meth_repr()
255 m->m_ml->ml_name); in meth_repr()
256 return PyUnicode_FromFormat("<built-in method %s of %s object at %p>", in meth_repr()
257 m->m_ml->ml_name, in meth_repr()
258 m->m_self->ob_type->tp_name, in meth_repr()
259 m->m_self); in meth_repr()
267 int eq; in meth_richcompare() local
277 eq = a->m_self == b->m_self; in meth_richcompare()
278 if (eq) in meth_richcompare()
279 eq = a->m_ml->ml_meth == b->m_ml->ml_meth; in meth_richcompare()
281 res = eq ? Py_True : Py_False; in meth_richcompare()
283 res = eq ? Py_False : Py_True; in meth_richcompare()
292 x = _Py_HashPointer(a->m_self); in meth_hash()
293 y = _Py_HashPointer((void*)(a->m_ml->ml_meth)); in meth_hash()
295 if (x == -1) in meth_hash()
296 x = -2; in meth_hash()
346 free_list = (PyCFunctionObject *)(v->m_self); in PyCFunction_ClearFreeList()
348 numfree--; in PyCFunction_ClearFreeList()
380 PyMethodDef *method = ((PyCFunctionObject *)func)->m_ml; in get_name()
381 return method->ml_name; in get_name()
393 "%.200s() takes no keyword arguments", get_name(func)); in cfunction_check_kwargs()
394 return -1; in cfunction_check_kwargs()
403 return NULL; in cfunction_enter_call()
414 return NULL; in cfunction_vectorcall_FASTCALL()
419 if (meth == NULL) { in cfunction_vectorcall_FASTCALL()
420 return NULL; in cfunction_vectorcall_FASTCALL()
434 if (meth == NULL) { in cfunction_vectorcall_FASTCALL_KEYWORDS()
435 return NULL; in cfunction_vectorcall_FASTCALL_KEYWORDS()
447 return NULL; in cfunction_vectorcall_NOARGS()
452 "%.200s() takes no arguments (%zd given)", get_name(func), nargs); in cfunction_vectorcall_NOARGS()
453 return NULL; in cfunction_vectorcall_NOARGS()
456 if (meth == NULL) { in cfunction_vectorcall_NOARGS()
457 return NULL; in cfunction_vectorcall_NOARGS()
459 PyObject *result = meth(PyCFunction_GET_SELF(func), NULL); in cfunction_vectorcall_NOARGS()
469 return NULL; in cfunction_vectorcall_O()
476 return NULL; in cfunction_vectorcall_O()
479 if (meth == NULL) { in cfunction_vectorcall_O()
480 return NULL; in cfunction_vectorcall_O()