• Guido van Rossum's avatar
    PyObject_Init[Var] is almost always called from the PyObject_NEW[_VAR] · 6e08c146
    Guido van Rossum yazdı
    macros.  The 'op' argument is then the result from PyObject_MALLOC,
    and that can of course be NULL.  In that case, PyObject_Init[Var]
    would raise a SystemError with "NULL object passed to
    PyObject_Init[Var]".  But there's nothing the caller of the macro can
    do about this.  So PyObject_Init[Var] should call just PyErr_NoMemory.
    
    Will backport.
    6e08c146
object.c 49 KB