Re: C Function with variable number of parameters
Jason McKesson <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
On 7/28/2010 5:09 PM, James Porter wrote: > On 7/28/2010 6:24 PM, Jason McKesson wrote: >> But if its not a Luabind function, then C++ exceptions can pass through it. > Unless things have changed since I last checked, C++ exceptions aren't > really safe to throw in Luabind functions anyway, since they'll blow > through the Lua parts of the call stack and leave it in an inconsistent > state. Things usually work afterwards, but that's more luck than > anything else. > > Of course, it's been a while since I looked at this, so it might be > different now. > > - Jim Luabind encapsulates all of its function calls in try blocks, and catches all exceptions and converts them into lua_errors. Thus, going back to the question: how do you register a multi-variate function through Luabind? ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm