diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 1998-08-11 19:52:51 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 1998-08-11 19:52:51 (GMT) |
commit | d10552379dd85f432545ba3c9199d2b232593f30 (patch) | |
tree | 0e9cb3cf6be4674b11b1a1406395aab80379b31e /Modules/cryptmodule.c | |
parent | 370f3c9eb6fd83038cb171fe45f41065d685a804 (diff) | |
download | cpython-d10552379dd85f432545ba3c9199d2b232593f30.zip cpython-d10552379dd85f432545ba3c9199d2b232593f30.tar.gz cpython-d10552379dd85f432545ba3c9199d2b232593f30.tar.bz2 |
Two fixes to find_class:
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.
Diffstat (limited to 'Modules/cryptmodule.c')
0 files changed, 0 insertions, 0 deletions