3#ifndef __NUITKA_COMPILED_CELL_H__
4#define __NUITKA_COMPILED_CELL_H__
10extern PyTypeObject Nuitka_Cell_Type;
12static inline bool Nuitka_Cell_Check(PyObject *
object) {
return Py_TYPE(
object) == &Nuitka_Cell_Type; }
13static inline bool Nuitka_CellOrPyCell_Check(PyObject *
object) {
14 return Nuitka_Cell_Check(
object) || PyCell_Check(
object);
31#ifdef __NUITKA_NO_ASSERT__
32#define Nuitka_Cell_GET(cell) (((struct Nuitka_CellObject *)(cell))->ob_ref)
34#define Nuitka_Cell_GET(cell) \
35 (CHECK_OBJECT(cell), assert(Nuitka_Cell_Check((PyObject *)cell)), (((struct Nuitka_CellObject *)(cell))->ob_ref))
38NUITKA_MAY_BE_UNUSED
static inline PyObject *Nuitka_CellOrPyCell_GET(PyObject *cell) {
40 assert(Nuitka_CellOrPyCell_Check(cell));
46extern int count_active_Nuitka_Cell_Type;
47extern int count_allocated_Nuitka_Cell_Type;
48extern int count_released_Nuitka_Cell_Type;
51NUITKA_MAY_BE_UNUSED
static inline void Nuitka_Cell_SET(
struct Nuitka_CellObject *cell_object, PyObject *value) {
52 CHECK_OBJECT_X(value);
53 CHECK_OBJECT(cell_object);
55 assert(Nuitka_Cell_Check((PyObject *)cell_object));
56 cell_object->ob_ref = value;
Definition compiled_cell.h:17