Buffer type checking cleanup/rewrite (now uses use_utility_code)
[cython.git] / Includes / python_instance.pxd
1 cdef extern from "Python.h":
2     ctypedef void PyObject
3     
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. 
11
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.
17
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.