/src/cpython3/Include/cpython/cellobject.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* Cell object interface */ |
2 | | |
3 | | #ifndef Py_LIMITED_API |
4 | | #ifndef Py_CELLOBJECT_H |
5 | | #define Py_CELLOBJECT_H |
6 | | #ifdef __cplusplus |
7 | | extern "C" { |
8 | | #endif |
9 | | |
10 | | typedef struct { |
11 | | PyObject_HEAD |
12 | | /* Content of the cell or NULL when empty */ |
13 | | PyObject *ob_ref; |
14 | | } PyCellObject; |
15 | | |
16 | | PyAPI_DATA(PyTypeObject) PyCell_Type; |
17 | | |
18 | 7.95k | #define PyCell_Check(op) Py_IS_TYPE((op), &PyCell_Type) |
19 | | |
20 | | PyAPI_FUNC(PyObject *) PyCell_New(PyObject *); |
21 | | PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); |
22 | | PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); |
23 | | |
24 | 0 | static inline PyObject* PyCell_GET(PyObject *op) { |
25 | 0 | PyObject *res; |
26 | 0 | PyCellObject *cell; |
27 | 0 | assert(PyCell_Check(op)); |
28 | 0 | cell = _Py_CAST(PyCellObject*, op); |
29 | 0 | Py_BEGIN_CRITICAL_SECTION(cell); |
30 | 0 | res = cell->ob_ref; |
31 | 0 | Py_END_CRITICAL_SECTION(); |
32 | 0 | return res; |
33 | 0 | } Unexecuted instantiation: exceptions.c:PyCell_GET Unexecuted instantiation: genericaliasobject.c:PyCell_GET Unexecuted instantiation: listobject.c:PyCell_GET Unexecuted instantiation: longobject.c:PyCell_GET Unexecuted instantiation: dictobject.c:PyCell_GET Unexecuted instantiation: moduleobject.c:PyCell_GET Unexecuted instantiation: object.c:PyCell_GET Unexecuted instantiation: obmalloc.c:PyCell_GET Unexecuted instantiation: picklebufobject.c:PyCell_GET Unexecuted instantiation: rangeobject.c:PyCell_GET Unexecuted instantiation: setobject.c:PyCell_GET Unexecuted instantiation: sliceobject.c:PyCell_GET Unexecuted instantiation: structseq.c:PyCell_GET Unexecuted instantiation: templateobject.c:PyCell_GET Unexecuted instantiation: tupleobject.c:PyCell_GET Unexecuted instantiation: typeobject.c:PyCell_GET Unexecuted instantiation: typevarobject.c:PyCell_GET Unexecuted instantiation: unicodeobject.c:PyCell_GET Unexecuted instantiation: unicodectype.c:PyCell_GET Unexecuted instantiation: unionobject.c:PyCell_GET Unexecuted instantiation: weakrefobject.c:PyCell_GET Unexecuted instantiation: _warnings.c:PyCell_GET Unexecuted instantiation: bltinmodule.c:PyCell_GET Unexecuted instantiation: ceval.c:PyCell_GET Unexecuted instantiation: codecs.c:PyCell_GET Unexecuted instantiation: codegen.c:PyCell_GET Unexecuted instantiation: compile.c:PyCell_GET Unexecuted instantiation: context.c:PyCell_GET Unexecuted instantiation: errors.c:PyCell_GET Unexecuted instantiation: flowgraph.c:PyCell_GET Unexecuted instantiation: frame.c:PyCell_GET Unexecuted instantiation: future.c:PyCell_GET Unexecuted instantiation: gc.c:PyCell_GET Unexecuted instantiation: gc_gil.c:PyCell_GET Unexecuted instantiation: getargs.c:PyCell_GET Unexecuted instantiation: ceval_gil.c:PyCell_GET Unexecuted instantiation: hamt.c:PyCell_GET Unexecuted instantiation: hashtable.c:PyCell_GET Unexecuted instantiation: import.c:PyCell_GET Unexecuted instantiation: importdl.c:PyCell_GET Unexecuted instantiation: initconfig.c:PyCell_GET Unexecuted instantiation: instrumentation.c:PyCell_GET Unexecuted instantiation: instruction_sequence.c:PyCell_GET Unexecuted instantiation: intrinsics.c:PyCell_GET Unexecuted instantiation: legacy_tracing.c:PyCell_GET Unexecuted instantiation: lock.c:PyCell_GET Unexecuted instantiation: marshal.c:PyCell_GET Unexecuted instantiation: modsupport.c:PyCell_GET Unexecuted instantiation: mysnprintf.c:PyCell_GET Unexecuted instantiation: parking_lot.c:PyCell_GET Unexecuted instantiation: preconfig.c:PyCell_GET Unexecuted instantiation: pyarena.c:PyCell_GET Unexecuted instantiation: pyctype.c:PyCell_GET Unexecuted instantiation: pyhash.c:PyCell_GET Unexecuted instantiation: pylifecycle.c:PyCell_GET Unexecuted instantiation: pystate.c:PyCell_GET Unexecuted instantiation: pythonrun.c:PyCell_GET Unexecuted instantiation: pytime.c:PyCell_GET Unexecuted instantiation: qsbr.c:PyCell_GET Unexecuted instantiation: bootstrap_hash.c:PyCell_GET Unexecuted instantiation: specialize.c:PyCell_GET Unexecuted instantiation: symtable.c:PyCell_GET Unexecuted instantiation: sysmodule.c:PyCell_GET Unexecuted instantiation: thread.c:PyCell_GET Unexecuted instantiation: traceback.c:PyCell_GET Unexecuted instantiation: tracemalloc.c:PyCell_GET Unexecuted instantiation: getopt.c:PyCell_GET Unexecuted instantiation: pystrcmp.c:PyCell_GET Unexecuted instantiation: pystrtod.c:PyCell_GET Unexecuted instantiation: dtoa.c:PyCell_GET Unexecuted instantiation: formatter_unicode.c:PyCell_GET Unexecuted instantiation: fileutils.c:PyCell_GET Unexecuted instantiation: suggestions.c:PyCell_GET Unexecuted instantiation: perf_trampoline.c:PyCell_GET Unexecuted instantiation: perf_jit_trampoline.c:PyCell_GET Unexecuted instantiation: remote_debugging.c:PyCell_GET Unexecuted instantiation: dynload_shlib.c:PyCell_GET Unexecuted instantiation: config.c:PyCell_GET Unexecuted instantiation: gcmodule.c:PyCell_GET Unexecuted instantiation: _asynciomodule.c:PyCell_GET Unexecuted instantiation: atexitmodule.c:PyCell_GET Unexecuted instantiation: faulthandler.c:PyCell_GET Unexecuted instantiation: posixmodule.c:PyCell_GET Unexecuted instantiation: signalmodule.c:PyCell_GET Unexecuted instantiation: _tracemalloc.c:PyCell_GET Unexecuted instantiation: _suggestions.c:PyCell_GET Unexecuted instantiation: _datetimemodule.c:PyCell_GET Unexecuted instantiation: _codecsmodule.c:PyCell_GET Unexecuted instantiation: _collectionsmodule.c:PyCell_GET Unexecuted instantiation: _iomodule.c:PyCell_GET Unexecuted instantiation: iobase.c:PyCell_GET Unexecuted instantiation: fileio.c:PyCell_GET Unexecuted instantiation: bytesio.c:PyCell_GET Unexecuted instantiation: bufferedio.c:PyCell_GET Unexecuted instantiation: textio.c:PyCell_GET Unexecuted instantiation: stringio.c:PyCell_GET Unexecuted instantiation: itertoolsmodule.c:PyCell_GET Unexecuted instantiation: sre.c:PyCell_GET Unexecuted instantiation: _sysconfig.c:PyCell_GET Unexecuted instantiation: _threadmodule.c:PyCell_GET Unexecuted instantiation: timemodule.c:PyCell_GET Unexecuted instantiation: _typesmodule.c:PyCell_GET Unexecuted instantiation: _typingmodule.c:PyCell_GET Unexecuted instantiation: _weakref.c:PyCell_GET Unexecuted instantiation: _abc.c:PyCell_GET Unexecuted instantiation: _functoolsmodule.c:PyCell_GET Unexecuted instantiation: _localemodule.c:PyCell_GET Unexecuted instantiation: _opcode.c:PyCell_GET Unexecuted instantiation: _operator.c:PyCell_GET Unexecuted instantiation: symtablemodule.c:PyCell_GET Unexecuted instantiation: pwdmodule.c:PyCell_GET Unexecuted instantiation: getpath.c:PyCell_GET Unexecuted instantiation: frozen.c:PyCell_GET Unexecuted instantiation: getbuildinfo.c:PyCell_GET Unexecuted instantiation: peg_api.c:PyCell_GET Unexecuted instantiation: file_tokenizer.c:PyCell_GET Unexecuted instantiation: helpers.c:PyCell_GET Unexecuted instantiation: myreadline.c:PyCell_GET Unexecuted instantiation: abstract.c:PyCell_GET Unexecuted instantiation: boolobject.c:PyCell_GET Unexecuted instantiation: bytes_methods.c:PyCell_GET Unexecuted instantiation: bytearrayobject.c:PyCell_GET Unexecuted instantiation: bytesobject.c:PyCell_GET Unexecuted instantiation: call.c:PyCell_GET Unexecuted instantiation: capsule.c:PyCell_GET Unexecuted instantiation: cellobject.c:PyCell_GET Unexecuted instantiation: classobject.c:PyCell_GET Unexecuted instantiation: codeobject.c:PyCell_GET Unexecuted instantiation: complexobject.c:PyCell_GET Unexecuted instantiation: descrobject.c:PyCell_GET Unexecuted instantiation: enumobject.c:PyCell_GET Unexecuted instantiation: genobject.c:PyCell_GET Unexecuted instantiation: fileobject.c:PyCell_GET Unexecuted instantiation: floatobject.c:PyCell_GET Unexecuted instantiation: frameobject.c:PyCell_GET Unexecuted instantiation: funcobject.c:PyCell_GET Unexecuted instantiation: interpolationobject.c:PyCell_GET Unexecuted instantiation: iterobject.c:PyCell_GET Unexecuted instantiation: odictobject.c:PyCell_GET Unexecuted instantiation: memoryobject.c:PyCell_GET Unexecuted instantiation: methodobject.c:PyCell_GET Unexecuted instantiation: namespaceobject.c:PyCell_GET Unexecuted instantiation: _contextvars.c:PyCell_GET Unexecuted instantiation: Python-ast.c:PyCell_GET Unexecuted instantiation: Python-tokenize.c:PyCell_GET Unexecuted instantiation: asdl.c:PyCell_GET Unexecuted instantiation: assemble.c:PyCell_GET Unexecuted instantiation: ast.c:PyCell_GET Unexecuted instantiation: ast_preprocess.c:PyCell_GET Unexecuted instantiation: ast_unparse.c:PyCell_GET Unexecuted instantiation: critical_section.c:PyCell_GET Unexecuted instantiation: crossinterp.c:PyCell_GET Unexecuted instantiation: getcopyright.c:PyCell_GET Unexecuted instantiation: getplatform.c:PyCell_GET Unexecuted instantiation: getversion.c:PyCell_GET Unexecuted instantiation: optimizer.c:PyCell_GET Unexecuted instantiation: pathconfig.c:PyCell_GET Unexecuted instantiation: pymath.c:PyCell_GET Unexecuted instantiation: structmember.c:PyCell_GET Unexecuted instantiation: pystrhex.c:PyCell_GET Unexecuted instantiation: pegen.c:PyCell_GET Unexecuted instantiation: pegen_errors.c:PyCell_GET Unexecuted instantiation: parser.c:PyCell_GET Unexecuted instantiation: buffer.c:PyCell_GET Unexecuted instantiation: lexer.c:PyCell_GET Unexecuted instantiation: state.c:PyCell_GET Unexecuted instantiation: readline_tokenizer.c:PyCell_GET Unexecuted instantiation: string_tokenizer.c:PyCell_GET Unexecuted instantiation: utf8_tokenizer.c:PyCell_GET Unexecuted instantiation: getcompiler.c:PyCell_GET Unexecuted instantiation: mystrtoul.c:PyCell_GET Unexecuted instantiation: token.c:PyCell_GET Unexecuted instantiation: action_helpers.c:PyCell_GET Unexecuted instantiation: string_parser.c:PyCell_GET |
34 | | #define PyCell_GET(op) PyCell_GET(_PyObject_CAST(op)) |
35 | | |
36 | 0 | static inline void PyCell_SET(PyObject *op, PyObject *value) { |
37 | 0 | PyCellObject *cell; |
38 | 0 | assert(PyCell_Check(op)); |
39 | 0 | cell = _Py_CAST(PyCellObject*, op); |
40 | 0 | Py_BEGIN_CRITICAL_SECTION(cell); |
41 | 0 | cell->ob_ref = value; |
42 | 0 | Py_END_CRITICAL_SECTION(); |
43 | 0 | } Unexecuted instantiation: exceptions.c:PyCell_SET Unexecuted instantiation: genericaliasobject.c:PyCell_SET Unexecuted instantiation: listobject.c:PyCell_SET Unexecuted instantiation: longobject.c:PyCell_SET Unexecuted instantiation: dictobject.c:PyCell_SET Unexecuted instantiation: moduleobject.c:PyCell_SET Unexecuted instantiation: object.c:PyCell_SET Unexecuted instantiation: obmalloc.c:PyCell_SET Unexecuted instantiation: picklebufobject.c:PyCell_SET Unexecuted instantiation: rangeobject.c:PyCell_SET Unexecuted instantiation: setobject.c:PyCell_SET Unexecuted instantiation: sliceobject.c:PyCell_SET Unexecuted instantiation: structseq.c:PyCell_SET Unexecuted instantiation: templateobject.c:PyCell_SET Unexecuted instantiation: tupleobject.c:PyCell_SET Unexecuted instantiation: typeobject.c:PyCell_SET Unexecuted instantiation: typevarobject.c:PyCell_SET Unexecuted instantiation: unicodeobject.c:PyCell_SET Unexecuted instantiation: unicodectype.c:PyCell_SET Unexecuted instantiation: unionobject.c:PyCell_SET Unexecuted instantiation: weakrefobject.c:PyCell_SET Unexecuted instantiation: _warnings.c:PyCell_SET Unexecuted instantiation: bltinmodule.c:PyCell_SET Unexecuted instantiation: ceval.c:PyCell_SET Unexecuted instantiation: codecs.c:PyCell_SET Unexecuted instantiation: codegen.c:PyCell_SET Unexecuted instantiation: compile.c:PyCell_SET Unexecuted instantiation: context.c:PyCell_SET Unexecuted instantiation: errors.c:PyCell_SET Unexecuted instantiation: flowgraph.c:PyCell_SET Unexecuted instantiation: frame.c:PyCell_SET Unexecuted instantiation: future.c:PyCell_SET Unexecuted instantiation: gc.c:PyCell_SET Unexecuted instantiation: gc_gil.c:PyCell_SET Unexecuted instantiation: getargs.c:PyCell_SET Unexecuted instantiation: ceval_gil.c:PyCell_SET Unexecuted instantiation: hamt.c:PyCell_SET Unexecuted instantiation: hashtable.c:PyCell_SET Unexecuted instantiation: import.c:PyCell_SET Unexecuted instantiation: importdl.c:PyCell_SET Unexecuted instantiation: initconfig.c:PyCell_SET Unexecuted instantiation: instrumentation.c:PyCell_SET Unexecuted instantiation: instruction_sequence.c:PyCell_SET Unexecuted instantiation: intrinsics.c:PyCell_SET Unexecuted instantiation: legacy_tracing.c:PyCell_SET Unexecuted instantiation: lock.c:PyCell_SET Unexecuted instantiation: marshal.c:PyCell_SET Unexecuted instantiation: modsupport.c:PyCell_SET Unexecuted instantiation: mysnprintf.c:PyCell_SET Unexecuted instantiation: parking_lot.c:PyCell_SET Unexecuted instantiation: preconfig.c:PyCell_SET Unexecuted instantiation: pyarena.c:PyCell_SET Unexecuted instantiation: pyctype.c:PyCell_SET Unexecuted instantiation: pyhash.c:PyCell_SET Unexecuted instantiation: pylifecycle.c:PyCell_SET Unexecuted instantiation: pystate.c:PyCell_SET Unexecuted instantiation: pythonrun.c:PyCell_SET Unexecuted instantiation: pytime.c:PyCell_SET Unexecuted instantiation: qsbr.c:PyCell_SET Unexecuted instantiation: bootstrap_hash.c:PyCell_SET Unexecuted instantiation: specialize.c:PyCell_SET Unexecuted instantiation: symtable.c:PyCell_SET Unexecuted instantiation: sysmodule.c:PyCell_SET Unexecuted instantiation: thread.c:PyCell_SET Unexecuted instantiation: traceback.c:PyCell_SET Unexecuted instantiation: tracemalloc.c:PyCell_SET Unexecuted instantiation: getopt.c:PyCell_SET Unexecuted instantiation: pystrcmp.c:PyCell_SET Unexecuted instantiation: pystrtod.c:PyCell_SET Unexecuted instantiation: dtoa.c:PyCell_SET Unexecuted instantiation: formatter_unicode.c:PyCell_SET Unexecuted instantiation: fileutils.c:PyCell_SET Unexecuted instantiation: suggestions.c:PyCell_SET Unexecuted instantiation: perf_trampoline.c:PyCell_SET Unexecuted instantiation: perf_jit_trampoline.c:PyCell_SET Unexecuted instantiation: remote_debugging.c:PyCell_SET Unexecuted instantiation: dynload_shlib.c:PyCell_SET Unexecuted instantiation: config.c:PyCell_SET Unexecuted instantiation: gcmodule.c:PyCell_SET Unexecuted instantiation: _asynciomodule.c:PyCell_SET Unexecuted instantiation: atexitmodule.c:PyCell_SET Unexecuted instantiation: faulthandler.c:PyCell_SET Unexecuted instantiation: posixmodule.c:PyCell_SET Unexecuted instantiation: signalmodule.c:PyCell_SET Unexecuted instantiation: _tracemalloc.c:PyCell_SET Unexecuted instantiation: _suggestions.c:PyCell_SET Unexecuted instantiation: _datetimemodule.c:PyCell_SET Unexecuted instantiation: _codecsmodule.c:PyCell_SET Unexecuted instantiation: _collectionsmodule.c:PyCell_SET Unexecuted instantiation: _iomodule.c:PyCell_SET Unexecuted instantiation: iobase.c:PyCell_SET Unexecuted instantiation: fileio.c:PyCell_SET Unexecuted instantiation: bytesio.c:PyCell_SET Unexecuted instantiation: bufferedio.c:PyCell_SET Unexecuted instantiation: textio.c:PyCell_SET Unexecuted instantiation: stringio.c:PyCell_SET Unexecuted instantiation: itertoolsmodule.c:PyCell_SET Unexecuted instantiation: sre.c:PyCell_SET Unexecuted instantiation: _sysconfig.c:PyCell_SET Unexecuted instantiation: _threadmodule.c:PyCell_SET Unexecuted instantiation: timemodule.c:PyCell_SET Unexecuted instantiation: _typesmodule.c:PyCell_SET Unexecuted instantiation: _typingmodule.c:PyCell_SET Unexecuted instantiation: _weakref.c:PyCell_SET Unexecuted instantiation: _abc.c:PyCell_SET Unexecuted instantiation: _functoolsmodule.c:PyCell_SET Unexecuted instantiation: _localemodule.c:PyCell_SET Unexecuted instantiation: _opcode.c:PyCell_SET Unexecuted instantiation: _operator.c:PyCell_SET Unexecuted instantiation: symtablemodule.c:PyCell_SET Unexecuted instantiation: pwdmodule.c:PyCell_SET Unexecuted instantiation: getpath.c:PyCell_SET Unexecuted instantiation: frozen.c:PyCell_SET Unexecuted instantiation: getbuildinfo.c:PyCell_SET Unexecuted instantiation: peg_api.c:PyCell_SET Unexecuted instantiation: file_tokenizer.c:PyCell_SET Unexecuted instantiation: helpers.c:PyCell_SET Unexecuted instantiation: myreadline.c:PyCell_SET Unexecuted instantiation: abstract.c:PyCell_SET Unexecuted instantiation: boolobject.c:PyCell_SET Unexecuted instantiation: bytes_methods.c:PyCell_SET Unexecuted instantiation: bytearrayobject.c:PyCell_SET Unexecuted instantiation: bytesobject.c:PyCell_SET Unexecuted instantiation: call.c:PyCell_SET Unexecuted instantiation: capsule.c:PyCell_SET Unexecuted instantiation: cellobject.c:PyCell_SET Unexecuted instantiation: classobject.c:PyCell_SET Unexecuted instantiation: codeobject.c:PyCell_SET Unexecuted instantiation: complexobject.c:PyCell_SET Unexecuted instantiation: descrobject.c:PyCell_SET Unexecuted instantiation: enumobject.c:PyCell_SET Unexecuted instantiation: genobject.c:PyCell_SET Unexecuted instantiation: fileobject.c:PyCell_SET Unexecuted instantiation: floatobject.c:PyCell_SET Unexecuted instantiation: frameobject.c:PyCell_SET Unexecuted instantiation: funcobject.c:PyCell_SET Unexecuted instantiation: interpolationobject.c:PyCell_SET Unexecuted instantiation: iterobject.c:PyCell_SET Unexecuted instantiation: odictobject.c:PyCell_SET Unexecuted instantiation: memoryobject.c:PyCell_SET Unexecuted instantiation: methodobject.c:PyCell_SET Unexecuted instantiation: namespaceobject.c:PyCell_SET Unexecuted instantiation: _contextvars.c:PyCell_SET Unexecuted instantiation: Python-ast.c:PyCell_SET Unexecuted instantiation: Python-tokenize.c:PyCell_SET Unexecuted instantiation: asdl.c:PyCell_SET Unexecuted instantiation: assemble.c:PyCell_SET Unexecuted instantiation: ast.c:PyCell_SET Unexecuted instantiation: ast_preprocess.c:PyCell_SET Unexecuted instantiation: ast_unparse.c:PyCell_SET Unexecuted instantiation: critical_section.c:PyCell_SET Unexecuted instantiation: crossinterp.c:PyCell_SET Unexecuted instantiation: getcopyright.c:PyCell_SET Unexecuted instantiation: getplatform.c:PyCell_SET Unexecuted instantiation: getversion.c:PyCell_SET Unexecuted instantiation: optimizer.c:PyCell_SET Unexecuted instantiation: pathconfig.c:PyCell_SET Unexecuted instantiation: pymath.c:PyCell_SET Unexecuted instantiation: structmember.c:PyCell_SET Unexecuted instantiation: pystrhex.c:PyCell_SET Unexecuted instantiation: pegen.c:PyCell_SET Unexecuted instantiation: pegen_errors.c:PyCell_SET Unexecuted instantiation: parser.c:PyCell_SET Unexecuted instantiation: buffer.c:PyCell_SET Unexecuted instantiation: lexer.c:PyCell_SET Unexecuted instantiation: state.c:PyCell_SET Unexecuted instantiation: readline_tokenizer.c:PyCell_SET Unexecuted instantiation: string_tokenizer.c:PyCell_SET Unexecuted instantiation: utf8_tokenizer.c:PyCell_SET Unexecuted instantiation: getcompiler.c:PyCell_SET Unexecuted instantiation: mystrtoul.c:PyCell_SET Unexecuted instantiation: token.c:PyCell_SET Unexecuted instantiation: action_helpers.c:PyCell_SET Unexecuted instantiation: string_parser.c:PyCell_SET |
44 | | #define PyCell_SET(op, value) PyCell_SET(_PyObject_CAST(op), (value)) |
45 | | |
46 | | #ifdef __cplusplus |
47 | | } |
48 | | #endif |
49 | | #endif /* !Py_TUPLEOBJECT_H */ |
50 | | #endif /* Py_LIMITED_API */ |