lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Mark -

Thanks for your quick response both here and via the SWIG bug tracker.
 I didn't realize my SWIG (1.3.29) was so old!  I'm building the
latest version now.

.. Adam


On Feb 11, 2008 5:20 PM, Mark Gossage <mark@gossage.cjb.net> wrote:
> Hello Adam,
> SWIG typemaps are actually quite simple. What happens is that the typemaps
> are used by SWIG to add in the correct code for converting from the
> scripting language natives to the C/C++ code.
> For
>
> void foo(int a, int* OUTPUT)
> SWIG will need two typemaps, one for int (which is found in luatypemaps.swg)
> and one for int* OUTPUT (which is found in typemaps.i)
> Similarly for
>
> void foo(int a, int& OUTPUT)
>  You need the int & the int& OUTPUT typemaps.
>
> Most of the typemaps for basic types were written and added into the SWIG
> code base a long time ago. the int& OUTPUT was added 15 months back. So if
> you don't have this, I suggest you get a more recent copy of SWIG.
>
> Any other questions can be sent to me directly or just sent to either the
> Lua list or SWIG list (watch both of them).
>
> Regards,
> Mark
>
>
>
>
>  ________________________________
>  Sent from Yahoo! - a smarter inbox.