This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PyModule_AddObject doesn't set exception
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, markovitch
Priority: normal Keywords:

Created on 2002-02-27 16:58 by markovitch, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg9450 - (view) Author: Yakov Markovitch (markovitch) Date: 2002-02-27 16:58
PyModule_AddObject tests for its first parameter to be
a module and third to be non-NULL and returns -1 if
these are wrong, but doesn't set any exception. This
behaviour is obviously wrong (at least for the case
when first parameter is not a module - this must be a
PyExc_TypeError).
msg9451 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2002-06-17 17:17
Logged In: YES 
user_id=3066

Actually, it doesn't check the 3rd arg, nor does it need to.
I've added appropriate exceptions in Python/modsupport.c
revisions 2.55.2.1, 2.58.16.1, and 2.60.
History
Date User Action Args
2022-04-10 16:05:02adminsetgithub: 36177
2002-02-27 16:58:51markovitchcreate