C Function with variable number of parameters

Markus Klotzbuecher <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hi,

I have a (dispatching) C function (not an ANSI C varargs) which
depending on the first parameter requires a variable number of
additional parameters. I currently solve this by registering functions
with arity 0 to 4 taking luabind::objects. What I would like to do is
register only one function with one arg which then can inspect the
stack using lua_gettop and call luabind::object::from_stack to get the
remaining arguments. What prevents this however, is luabind checking
for the exact number of parameters and complaining "No matching
overloads found". Does anybody know how to solve this?

Thanks in advance!
Markus

------------------------------------------------------------------------------
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://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
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.