セルオブジェクト (cell object)
******************************

"Cell" objects are used to implement variables referenced by multiple
scopes. For each such variable, a cell object is created to store the
value; the local variables of each stack frame that references the
value contain a reference to the cells from outer scopes which also
use that variable.  When the value is accessed, the value contained in
the cell is used instead of the cell object itself.  This de-
referencing of the cell object requires support from the generated
byte-code; these are not automatically de-referenced when accessed.
Cell objects are not likely to be useful elsewhere.

type PyCellObject

   セルオブジェクトに使われる C 構造体です。

PyTypeObject PyCell_Type

   セルオブジェクトに対応する型オブジェクトです。

int PyCell_Check(PyObject *ob)

   *ob* がセルオブジェクトの場合に真を返します; *ob* は "NULL" であっ
   てはなりません。この関数は常に成功します。

PyObject *PyCell_New(PyObject *ob)
    *戻り値: 新しい参照。*

   値 *ob* の入った新たなセルオブジェクトを生成して返します。 引数を
   "NULL" にしてもかまいません。

PyObject *PyCell_Get(PyObject *cell)
    *戻り値: 新しい参照。*

   セル *cell* の内容を返します。 内容は "NULL" の場合もあります。
   *cell* がセルオブジェクトでなければ、例外を設定して "NULL" を返しま
   す。

PyObject *PyCell_GET(PyObject *cell)
    *戻り値: 借用参照。*

   *cell* の内容を返しますが、*cell* が非 "NULL" かつセルオブジェクト
   であるかどうかはチェックしません。

int PyCell_Set(PyObject *cell, PyObject *value)

   セルオブジェクト *cell* の内容を *value* に設定します。 セルに現在
   格納されている内容への参照は解放します。 *value* は "NULL" でも構い
   ません。 *cell* は "NULL" であってはなりません。

   成功すると "0" を返します。 *cell* がセルオブジェクトでなければ、例
   外を設定して "-1" を返します。

void PyCell_SET(PyObject *cell, PyObject *value)

   セルオブジェクト *cell* の値を *value* に設定します。 参照カウント
   に対する変更はなく、安全のためのチェックは何も行いません。*cell* は
   非 "NULL" でなければならず、かつセルオブジェクトでなければなりませ
   ん。
