メソッドオブジェクト
********************

There are some useful functions that are useful for working with
method objects.

PyTypeObject PyMethod_Type

   この "PyTypeObject" のインスタンスは Python のメソッド型を表現しま
   す。このオブジェクトは、 "types.MethodType"  として Python プログラ
   ムに公開されています。

int PyMethod_Check(PyObject *o)

   *o* がメソッドオブジェクト ("PyMethod_Type" 型である) 場合に真を返
   します。パラメータは *NULL* にできません。

PyObject* PyMethod_New(PyObject *func, PyObject *self, PyObject *class)
    *Return value: New reference.*

   Return a new method object, with *func* being any callable object;
   this is the function that will be called when the method is called.
   If this method should be bound to an instance, *self* should be the
   instance and *class* should be the class of *self*, otherwise
   *self* should be *NULL* and *class* should be the class which
   provides the unbound method..

PyObject* PyMethod_Class(PyObject *meth)
    *Return value: Borrowed reference.*

   Return the class object from which the method *meth* was created;
   if this was created from an instance, it will be the class of the
   instance.

PyObject* PyMethod_GET_CLASS(PyObject *meth)
    *Return value: Borrowed reference.*

   Macro version of "PyMethod_Class()" which avoids error checking.

PyObject* PyMethod_Function(PyObject *meth)
    *Return value: Borrowed reference.*

   メソッド *meth* に関連付けられている関数オブジェクトを返します。

PyObject* PyMethod_GET_FUNCTION(PyObject *meth)
    *Return value: Borrowed reference.*

   "PyMethod_Function()" のマクロ版で、エラーチェックを行いません。

PyObject* PyMethod_Self(PyObject *meth)
    *Return value: Borrowed reference.*

   Return the instance associated with the method *meth* if it is
   bound, otherwise return *NULL*.

PyObject* PyMethod_GET_SELF(PyObject *meth)
    *Return value: Borrowed reference.*

   "PyMethod_Self()" のマクロ版で、エラーチェックを行いません。

int PyMethod_ClearFreeList()

   free list をクリアします。解放された要素数を返します。

   バージョン 2.6 で追加.
