• Jeremy Hylton's avatar
    Two fixes to find_class: · d1055237
    Jeremy Hylton yazdı
    1. Only DECREF the class's module when the module is retrieved via
    PyImport_Import.  If it is retrieved from the modules dictionary with
    PyDict_GetItem, it is using a borrowed reference.
    
    2. If the module doesn't define the desired class, raise the same
    SystemError that pickle.py does instead of returning an AttributeError
    (which is cryptic at best).
    
    Also, fix the PyArg_ParseTuple in cpm_loads (the externally visible
    loads) function:  Use "S" instead of "O" because cStringIO will croak
    with a "bad arguments to internal function" if passed anything other
    than a string.
    d1055237
Adı
Son kayıt (commit)
Son güncelleme
BeOS Loading commit data...
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.hgtags Loading commit data...
Makefile.in Loading commit data...
README Loading commit data...
acconfig.h Loading commit data...
config.h.in Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...