[C++-sig] Boost.Python call policies at runtime...
Kevin Jones
investtcartier at yahoo.com
Thu Nov 9 17:22:40 CET 2006
Hi all,
Given a class called Variant that can (at runtime)
contain either an int or a T*.
I.E.
class Variant {
public:
int type;
union {
int i;
T* t;
};
};
How can I create a call policy that uses
return_by_value when Variant is an int or
manage_new_object when Variant is a T* (based on the
value of "type" at runtime)?
Note: I need to wrap either the int as a python object
or T* as a python object and not Variant.
Any help or sugestions would be most appreciated.
Best regards,
Kevin Jones
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
More information about the Cplusplus-sig
mailing list