Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4701 closed Bugs (invalid)

get_override() exception set

Reported by: trigves@… Owned by: Dave Abrahams
Milestone: To Be Determined Component: python USE GITHUB
Version: Boost 1.44.0 Severity: Showstopper
Keywords: get_override exception Cc:

Description

In base::get_override() PyObject_GetAttrString() is used to retrieve the attribute. But this function set exception in python if attribute is not found. Given patch solves it by using PyObject_HasAttrString() first and only if attribute exist, use PyObject_GetAttrString()

Attachments (1)

boost_python_get_override.patch (773 bytes ) - added by trigves@… 12 years ago.

Download all attachments as: .zip

Change History (3)

by trigves@…, 12 years ago

comment:1 by Dave Abrahams, 12 years ago

Resolution: invalid
Status: newclosed

Can you please submit a minimal test example that demonstrates incorrect behavior, whose behavior is fixed by the patch? You can use libs/python/test/polymorphism2.* as an example on which to base your tests, or, better yet, submit a patch that modifies that test to reveal the problem you're trying to solve.

Until then, closing as invalid, but hoping you'l come back with a test and re-open the ticket

comment:2 by trigves@…, 12 years ago

I'm sorry it was my fault.

I've tried to isolated the problem for the past 2 days and found out my virtual function wasn't "exported" (name mismatch) in class therefore get_override() couldn't find it.

Trigve

Note: See TracTickets for help on using tickets.