Lines Matching defs:code
49 PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname)
57 PyCodeObject *code_obj = (PyCodeObject *)code;
148 PyFunction_New(PyObject *code, PyObject *globals)
150 return PyFunction_NewWithQualName(code, globals, NULL);
372 * other than a code object. */
375 "__code__ must be set to a code object");
389 "%U() requires a code object with %zd free vars,"
578 [clinic start generated code]*/
579 /*[clinic end generated code: output=da39a3ee5e6b4b0d input=70af9c90aa2e71b0]*/
584 The closure must correspond to the free variables of the code object.
586 if len(code.co_freevars) == 0:
589 len(closure) == len(code.co_freevars)
596 code: object(type="PyCodeObject *", subclass_of="&PyCode_Type")
597 a code object
601 a string that overrides the name from the code object
608 [clinic start generated code]*/
611 func_new_impl(PyTypeObject *type, PyCodeObject *code, PyObject *globals,
613 /*[clinic end generated code: output=99c6d9da3a24e3be input=93611752fc2daf11]*/
629 if (code->co_nfreevars && closure == Py_None) {
643 if (code->co_nfreevars != nclosure)
646 code->co_name, code->co_nfreevars, nclosure);
658 if (PySys_Audit("function.__new__", "O", code) < 0) {
662 newfunc = (PyFunctionObject *)PyFunction_New((PyObject *)code,
696 // Don't Py_CLEAR(op->func_code), since code is always required