PyObject_NewVar(type, typeobj, n) is similar but allocates a variable-size object with room for n items. In addition to the refcount and type pointer fields, this also fills in the ob_size field.
See Implementation
PyObject_NewVar(type, typeobj, n) is similar but allocates a variable-size object with room for n items. In addition to the refcount and type pointer fields, this also fills in the ob_size field.