[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to pass arguments to argv function effectively in Lua C API
- From: Alexander Gladysh <agladysh@...>
- Date: Thu, 24 Mar 2011 04:42:09 +0300
Hi, list!
I want to bind to Lua a third-party argv function, taking a list of
strings as input:
foo * bar(baz * pSelf, int argc, char ** argv, size_t * argvlen);
In Lua:
local result = obj:bar("forty", "-", "two")
The question: what is a best way write bindings for bar() in Lua C API?
My current implementation is downright ugly: http://bit.ly/hw9Fpe
(Called from here: http://bit.ly/dHJ5Vm)
Thanks,
Alexander.