Re: C Function with variable number of parameters

Nigel Atkinson <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <1280447223.1524.14.camel@rincewind>
Ah - so you CAN throw exceptions inside a bound function and expect good
behaviour.  Good to know.  I stand corrected. :-)

So  the immediate solution is to use lua_register, and emulate what
luabind does with exceptions, but within the bound function, i..e catch
them and call lua_error.

If there was such a way to bind a function expecting variable arity, I
wonder how it would be best done?  A policy that turns the checking off?
Or a policy  to mark parameters after a certain number as optional?

It might be a bit of a major code change - but I have only looked at
small parts of the luabind source, so I'm just guessing.

Nigel

On Thu, 2010-07-29 at 07:26 -0700, Jason McKesson wrote:m

> Luabind encapsulates all of its function calls in try blocks, and 
> catches all exceptions and converts them into lua_errors.

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

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.