instance.pxd 985 B

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