[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luajit: any way to make array initialization zero-based?
- From: Dimiter 'malkia' Stanev <malkia@...>
- Date: Wed, 13 Jun 2012 15:52:28 -0700
LuaJIT FFI handles "C" types, and in "C" arrays start from 0.
The solution is to let your users be aware of this from the start.
No better solution than this.
On 6/13/2012 3:46 PM, Chris wrote:
On Wed, Jun 13, 2012 at 6:07 PM, Chris<firstname.lastname@example.org> wrote:
I suppose something to make the
FFI arrays one-based would work just as well.
After looking at the Lua libraries some more I think making Lua
zero-based might be too problematic. If that's the case then making
LuaJIT's FFI interface one-based would be better. So the ctype
element would actually be the array at the C level. I believe a
while ago I looked into trying to make a change like that to LuaJIT
but it wasn't obvious how to do it.