[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to pass arguments to argv function effectively in Lua C API
- From: Alexander Gladysh <agladysh@...>
- Date: Thu, 24 Mar 2011 05:47:24 +0300
On Thu, Mar 24, 2011 at 05:35, Thomas Harning Jr. <firstname.lastname@example.org> wrote:
> On Wed, Mar 23, 2011 at 9:54 PM, Alexander Gladysh <email@example.com> wrote:
>> On Thu, Mar 24, 2011 at 04:50, Luiz Henrique de Figueiredo
>> <firstname.lastname@example.org> wrote:
>>>> 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);
>>>> The question: what is a best way write bindings for bar() in Lua C API?
> One option that would be to convert the argv into a Lua array, then
> you would be without limitations.
> foo * bar(baz * pSelf, int argc, char ** argv, size_t * argvlen)
Please note that bar() is a third party function that I'm writing
bindings for. I can not change its definition. Please see the links
I've provided in the original post to see a specific example.