1 Aug 2007 02:08
Re: SWIG Bug -- Smart Pointer and Templated Method returning Smart Pointer
William S Fulton <wsf <at> fultondesigns.co.uk>
2007-08-01 00:08:33 GMT
2007-08-01 00:08:33 GMT
craigdo <at> ee.washington.edu wrote:
> I have a problem with a SWIG binding that combines smart pointers and a
> method returning a templated smart pointer. It appears to be a SWIG bug,
> but I could be misunderestimating what I need to do with respect to the
> wrapping strategery.
>
> SWIG seems to correctly figure out that a smart pointer is involved on the
> calling side and do the required (*arg)->method for the non-template methods
> in my class Object, but seems to forget that a smart pointer is involved in
> the templated method and just does the arg->method call.
>
> Here's an excerpt from a simplified .i file that demonstrates the problem:
>
> ---------- begin included text ----------
>
> namespace ns {
>
> template <typename T>
> class Ptr
> {
> public:
> Ptr ();
> T *operator -> ();
> };
>
> class InterfaceId
> {
> InterfaceId (uint16_t iid);
> };
>
(Continue reading)
RSS Feed