SWIG Calling Script Language Functions (Lua, specifically)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SWIG Calling Script Language Functions (Lua, specifically)

Eddie Parker-2
Hello!

I hadn't considered this, but I saw a post somewhere that SWIG is a good
alternative to binding C++ to Lua, versus luabind and tolua.  I've given
this a try, and it does indeed seem easy to have Lua code access my C++
objects.

My question however, is whether it's possible to call Lua functions from
C++.  Specifically to call them and pass them C++ objects, and have SWIG
set the appropriate metatable while they transition.  This is important,
especially if it can handle not only copy-by-value, but also by reference.

Anyhow, in reading the documentation, I couldn't find anything of the
sort mentioned, and I'm curious if I'm missing something, or if anyone
could give me a brief synopsis as to how I could achieve this using
SWIG.  If I *have* missed some piece of documentation, feel free to
scold me, but I'd still appreciate a pointer as to where to look!

Thanks in advance!

-e-

P.S.  If you could please CC me should you reply, as I don't subscribe
to this mailing list, that would be appreciated. :)


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user