lua-users home
lua-l archive

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

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.
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).


Sent from Yahoo! - a smarter inbox.