[C++-sig] Re: Pyste bug: Fails to pull in inherited members

Nicodemus nicodemus at esss.com.br
Fri Oct 24 01:39:00 CEST 2003


Hi Niall,

Niall Douglas wrote:

>On 18 Oct 2003 at 3:49, c++-sig at python.org wrote:
>
>  
>
>>I have absolutely no idea why, but when you feed all the pyste files
>>to pyste at once it fails to wrap inherited members for my FXIODeviceS
>>class, the ones it inherited from FXIODevice.
>>
>>But when you pass FXIODeviceS.pyste on its own, it works fine. Very
>>odd.
>>
>>I'm afraid I've not been able to localise this one Bruno, so I'm
>>guessing the only choice is to download v0.4 when it's released in the
>>next week or so and work with that. Sorry about that.
>>    
>>
>
>Scratch that, I've found it!
>
>In FXIODevice, I have the following:
>
>virtual FXuval readBlock(char *data, FXuval maxlen)=0;
>
>and its convenience overload:
>
>FXuval readBlock(FXuchar *data, FXuval maxlen) { return 
>readBlock((char *) data, maxlen); }
>
>FXIODeviceS inherits from FXIODevice and pyste generates for it 
>(IODeviceS):
>
>        .def("readBlock", pure_virtual(&FX::FXIODevice::readBlock))
>
>This is ambiguous. It should be:
>
>        .def("readBlock", pure_virtual((long unsigned int 
>(FX::FXIODevice::*)(char*, long unsigned int) 
>)&FX::FXIODevice::readBlock))
>
>... which is what pyste generates for FXIODevice.
>
>I'm guessing pyste is somehow not noticing the base class overloads 
>despite the use of Import()?
>
>BTW, it was erratic before because sometimes IODevice was defined 
>before IODeviceS, other times not.
>

I couldn't reproduce this example either. 8(
However I did find that bug you mentioned about Pyste generating several 
class_ for the same class, and I've commited a fix.

Thanks,
Nicodemus.





More information about the Cplusplus-sig mailing list