lua-users home
lua-l archive

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


After some test, I get this solution.

local args = ffi.new('const char*[2]')
args[0] = arg[0]
args[1] = nil

Is this right.

2011/2/24 zhiguo zhao <zhaozg@gmail.com>
Hi, 

    I want to wrap int Init(int argc, char** argv) .
   I can understand that ffi.new('char[1][1]"), ffi.new('char**") which should be used.

   Any advice is valuable for me, thanks.