Home
last modified time | relevance | path

Searched refs:co_freevars (Results 1 – 18 of 18) sorted by relevance

/third_party/python/Objects/clinic/
Dcodeobject.c.h161 PyObject *co_varnames, PyObject *co_freevars,
184 PyObject *co_freevars = self->co_freevars; in code_replace() local
305 co_freevars = args[11]; in code_replace()
352 …, co_flags, co_firstlineno, co_code, co_consts, co_names, co_varnames, co_freevars, co_cellvars, c… in code_replace()
/third_party/python/Include/cpython/
Dcode.h31 PyObject *co_freevars; /* tuple of strings (free variable names) */ member
114 #define PyCode_GetNumFree(op) (PyTuple_GET_SIZE((op)->co_freevars))
/third_party/python/Lib/
Ddis.py177 if co.co_freevars:
179 for i_n in enumerate(co.co_freevars):
273 cell_names = co.co_cellvars + co.co_freevars
370 cell_names = co.co_cellvars + co.co_freevars
482 self._cell_names = co.co_cellvars + co.co_freevars
Dinspect.py1577 for var, cell in zip(code.co_freevars, func.__closure__)
/third_party/python/Objects/
Dframeobject.c633 + PyTuple_GET_SIZE(code->co_freevars)); in frame_nslots()
711 nfrees = PyTuple_GET_SIZE(code->co_freevars); in frame_sizeof()
789 Py_ssize_t nfrees = PyTuple_GET_SIZE(code->co_freevars); in frame_alloc()
1049 nfreevars = PyTuple_GET_SIZE(co->co_freevars); in PyFrame_FastToLocalsWithError()
1064 if (map_to_dict(co->co_freevars, nfreevars, in PyFrame_FastToLocalsWithError()
1111 nfreevars = PyTuple_GET_SIZE(co->co_freevars); in PyFrame_LocalsToFast()
1117 dict_to_map(co->co_freevars, nfreevars, in PyFrame_LocalsToFast()
Dcodeobject.c252 co->co_freevars = freevars; in PyCode_NewWithPosOnlyArgs()
394 {"co_freevars", T_OBJECT, OFF(co_freevars), READONLY},
661 Py_XDECREF(co->co_freevars); in code_dealloc()
728 PyObject *co_varnames, PyObject *co_freevars, in code_replace_impl() argument
760 co_varnames, co_freevars, co_cellvars, co_filename, co_name, in code_replace_impl()
965 eq = PyObject_RichCompareBool(co->co_freevars, cp->co_freevars, Py_EQ); in code_richcompare()
1003 h5 = PyObject_Hash(co->co_freevars); in code_hash()
Dfuncobject.c564 nfree = PyTuple_GET_SIZE(code->co_freevars); in func_new_impl()
Dtypeobject.c8888 if (co->co_freevars == NULL) { in super_init_without_args()
8892 assert(PyTuple_Check(co->co_freevars)); in super_init_without_args()
8893 n = PyTuple_GET_SIZE(co->co_freevars); in super_init_without_args()
8898 PyObject *name = PyTuple_GET_ITEM(co->co_freevars, i); in super_init_without_args()
/third_party/python/Lib/test/
Dtest_code.py183 return c.replace(co_freevars=c.co_freevars + ('__class__',))
230 co.co_freevars,
Dtest_future.py373 self.assertEqual(foo().__code__.co_freevars, ())
Dtest_sys.py1293 nfrees = len(x.f_code.co_freevars)
/third_party/mindspore/mindspore/_extends/parse/
Dnamespace.py83 names = fn.__code__.co_freevars
/third_party/python/Python/
Dceval.c3083 assert(idx >= 0 && idx < PyTuple_GET_SIZE(co->co_freevars)); in _PyEval_EvalFrameDefault()
3084 name = PyTuple_GET_ITEM(co->co_freevars, idx); in _PyEval_EvalFrameDefault()
4995 for (i = 0; i < PyTuple_GET_SIZE(co->co_freevars); ++i) { in _PyEval_MakeFrameVector()
6287 name = PyTuple_GET_ITEM(co->co_freevars, oparg - in format_exc_unbound()
Dmarshal.c522 w_object(co->co_freevars, p); in w_complex_object()
Dcompile.c2028 PyObject *name = PyTuple_GET_ITEM(co->co_freevars, i); in compiler_make_closure()
2055 co->co_freevars); in compiler_make_closure()
/third_party/python/Doc/library/
Ddis.rst1070 less than the length of *co_cellvars*. Otherwise it is ``co_freevars[i -
Dinspect.rst176 | | co_freevars | tuple of names of free |
/third_party/python/Doc/reference/
Ddatamodel.rst972 single: co_freevars (code object attribute)
984 that are referenced by nested functions; :attr:`co_freevars` is a tuple