#3356 closed Bugs (fixed)
operator! does not check for errors
Reported by: | Stefan Seefeld | Owned by: | Dave Abrahams |
---|---|---|---|
Milestone: | Boost 1.41.0 | Component: | python USE GITHUB |
Version: | Boost 1.39.0 | Severity: | Problem |
Keywords: | Cc: | rwgk@… |
Description
operator! (as well as the bool conversion operator) call PyObject_IsTrue, and convert the result to a boolean, even though the result may be an error (e.g., -1).
Here is a fix.
Attachments (1)
Change History (3)
by , 13 years ago
comment:1 by , 13 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 13 years ago
For the records: svn rev. 55742 merges the patch into the release branch.
Note:
See TracTickets
for help on using tickets.
I've checked in a similar patch as svn trunk rev. 55708. The differences are to use the throw_error_already_set() function and to stay a close as possible to the original code (avoid == 1). I'll ask Beman for permission to merge the change into the release branch. Ralf