From: Yura Date: 2003-04-19T09:49:01+09:00 Subject: Re: [Q] "dynamic_cast" with Ruby and Swig > -----Original Message----- > From: Lyle Johnson [mailto:lyle@users.sourceforge.net] > Sent: April 18, 2003 19:56 > > This is probably more clear: > > %extend Base { > Derived *toDerived() { return dynamic_cast(self); } > } Indeed. Thank you. I was just doing copy/paste from Swig-generated wrapper code. With your version Swig automatically generates "my" code into the "static VALUE _wrap_Base_toDerived(...)" Yura.