[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [LuaJIT] ffi.cundef or ffi.reset ?
- From: Patrick Rapin <toupie300@...>
- Date: Tue, 27 Mar 2012 14:20:58 +0200
> No, there's not. Use require() to load files with C definitions.
> It already takes care of not running the code twice.
Thanks.
The require() function is actually what I am using, except that during
development, I write " package.loaded.module = nil " to force
reloading of modified Lua sources.
But it doesn't work when ffi.cdef is used.
Normally, in Lua, everything is collectible when there are no
reference to it ; FFI C definitions are an exception to that rule.
Anyway, there are workarounds, so this is not critical.