PyObject_Init

Don't allocate memory. Instead of a 'type' parameter, take a pointer to a new object (allocated by an arbitrary allocator), and initialize its object header fields.

  1. PyObject_BorrowedRef* PyObject_Init(PyObject*, PyTypeObject*)
    extern (C)
    PyObject_BorrowedRef*
    PyObject_Init
  2. Borrowed!PyVarObject* PyObject_InitVar(PyVarObject*, PyTypeObject*, Py_ssize_t)

Meta