• Home
  • Raw
  • Download

Lines Matching refs:op

8     PyCellObject *op;  in PyCell_New()  local
10 op = (PyCellObject *)PyObject_GC_New(PyCellObject, &PyCell_Type); in PyCell_New()
11 if (op == NULL) in PyCell_New()
13 op->ob_ref = obj; in PyCell_New()
16 _PyObject_GC_TRACK(op); in PyCell_New()
17 return (PyObject *)op; in PyCell_New()
21 PyCell_Get(PyObject *op) in PyCell_Get() argument
23 if (!PyCell_Check(op)) { in PyCell_Get()
27 Py_XINCREF(((PyCellObject*)op)->ob_ref); in PyCell_Get()
28 return PyCell_GET(op); in PyCell_Get()
32 PyCell_Set(PyObject *op, PyObject *obj) in PyCell_Set() argument
35 if (!PyCell_Check(op)) { in PyCell_Set()
39 oldobj = PyCell_GET(op); in PyCell_Set()
41 PyCell_SET(op, obj); in PyCell_Set()
47 cell_dealloc(PyCellObject *op) in cell_dealloc() argument
49 _PyObject_GC_UNTRACK(op); in cell_dealloc()
50 Py_XDECREF(op->ob_ref); in cell_dealloc()
51 PyObject_GC_Del(op); in cell_dealloc()
73 cell_repr(PyCellObject *op) in cell_repr() argument
75 if (op->ob_ref == NULL) in cell_repr()
76 return PyString_FromFormat("<cell at %p: empty>", op); in cell_repr()
79 op, op->ob_ref->ob_type->tp_name, in cell_repr()
80 op->ob_ref); in cell_repr()
84 cell_traverse(PyCellObject *op, visitproc visit, void *arg) in cell_traverse() argument
86 Py_VISIT(op->ob_ref); in cell_traverse()
91 cell_clear(PyCellObject *op) in cell_clear() argument
93 Py_CLEAR(op->ob_ref); in cell_clear()
98 cell_get_contents(PyCellObject *op, void *closure) in cell_get_contents() argument
100 if (op->ob_ref == NULL) in cell_get_contents()
105 Py_INCREF(op->ob_ref); in cell_get_contents()
106 return op->ob_ref; in cell_get_contents()