From: colin g. <cgs...@gm...> - 2011-12-12 17:19:44
|
The %rename can be used to rename C stucts. On Mon, Dec 12, 2011 at 8:06 AM, Sebastien Loriot <slo...@gm...>wrote: > I think %rename is meant to be applied to function names and not class > names. > > Sebastien. > > colin gray wrote: > >> Hello, >> I have the below structure in my SWIG interface file and thusly my >> sample.h header file. I'm assuming the sockaddr, ios_boolean and unsigned >> char definitions from this structure are the reason why I get the below >> generated classes. If I know the type on that ios_boolean and unsigned >> char map to on the Java side is there a way to use an %apply to get rid of >> the generated pointer classes? I tried %apply int {ios_boolean}; but then >> I get a SWIGTYPE_p_boolean.java. Any ideas? >> >> %rename (Sample) sample_details_t_; >> typedef struct sample_details_t_ { ios_boolean >> is_allowed; unsigned char >> mac[11]; } sample_t; >> >> generates: >> SWIGTYPE_p_unsigned_char.java >> SWIGTYPE_p_ios_boolean.java >> >> Thanks! >> -- >> Colin >> >> >> ------------------------------**------------------------------** >> ------------ >> >> ------------------------------**------------------------------** >> ------------------ >> Learn Windows Azure Live! Tuesday, Dec 13, 2011 >> Microsoft is holding a special Learn Windows Azure training event for >> developers. It will provide a great way to learn Windows Azure and what it >> provides. You can attend the event by watching it streamed LIVE online. >> Learn more at http://p.sf.net/sfu/ms-**windowsazure<http://p.sf.net/sfu/ms-windowsazure> >> >> >> ------------------------------**------------------------------** >> ------------ >> >> ______________________________**_________________ >> Swig-user mailing list >> Swi...@li...urceforge.**net <Swi...@li...> >> https://lists.sourceforge.net/**lists/listinfo/swig-user<https://lists.sourceforge.net/lists/listinfo/swig-user> >> > > -- Colin Gray |