lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.