1 cdef extern from "Python.h":
4 ############################################################################
5 # 7.5.2 Instance Objects
6 ############################################################################
7 # PyTypeObject PyInstance_Type
8 # Type object for class instances.
9 # int PyInstance_Check(PyObject *obj)
10 # Return true if obj is an instance.
12 object PyInstance_New(PyObject* cls, object arg, object kw)
13 # Return value: New reference.
14 # Create a new instance of a specific class. The parameters arg
15 # and kw are used as the positional and keyword parameters to the
16 # object's constructor.
18 object PyInstance_NewRaw(object cls, object dict)
19 # Return value: New reference.
20 # Create a new instance of a specific class without calling its
21 # constructor. class is the class of new object. The dict
22 # parameter will be used as the object's __dict__; if NULL, a new
23 # dictionary will be created for the instance.