SWIG Calling Script Language Functions (Lua, specifically)
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++
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!
P.S. If you could please CC me should you reply, as I don't subscribe
to this mailing list, that would be appreciated. :)