Re: [LuaJIT] ffi.cundef or ffi.reset ?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [LuaJIT] ffi.cundef or ffi.reset ?
- From: Mike Pall <mikelu-1203@...>
- Date: 2012年3月27日 13:15:02 +0200
Patrick Rapin wrote:
> dofile "test.lua" -- OK
> dofile "test.lua" --> test.lua:1: attempt to redefine 'FOO'
>
> Is there any way to reset the declarations made by ffi.cdef ?
No, there's not. Use require() to load files with C definitions.
It already takes care of not running the code twice.
--Mike