Discussion:
LuaJIT2.1-alpha question <SOLVED>
Maynard, Ed
2014-10-10 18:44:10 UTC
Permalink
Putting the cdefs in a separate file file and using require does the trick. Thanks to you all!

Ed

-----Original Message-----
From: luajit-bounce-***@public.gmane.org [mailto:luajit-bounce-***@public.gmane.org] On Behalf Of Geoff Leyland
Sent: Thursday, October 9, 2014 5:29 PM
To: luajit-***@public.gmane.org
Subject: Re: LuaJIT2.1-alpha question
In the meantime, it appears that this is a well-known issue (redefinition of C structures) without a built-in solution other than creating a new instance of Lua (akin to exit and restart). It also appears that there is no ready way to evaluate whether a variable has been declared or not - no table to look through.
Can you just stick the cdefs into a separate file and require it? If C structure definitions are being remembered, surely package.loaded is being remembered as well?
This message and any attachments may be a confidential attorney-client communication or otherwise be privileged and confidential. If you are not the intended recipient, any review, distribution or copying of this transmittal is prohibited. If you have received this transmittal in error, please reply by e-mail and delete this message and all attachments.
Loading...