lua-users home
lua-l archive

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


On Tue, Apr 10, 2012 at 4:14 PM, liam mail <liam.list@googlemail.com> wrote:
> I do not see this behaviour on OSX 10.6 for 5.1.4 and 5.2.0, instead I
> see 'Created' and 'GC'd'.

Hmm, that's strange.  I was just able to reproduce it on OS 10.7.3
with Lua 5.2 (originally I reproduced it on Linux).  Here are the
exact steps I followed:

$ vim ext.c
<paste in the C program I posted>
$ gcc -fpic -shared -o ext.so ext.c -undefined dynamic_lookup
$ vim test.lua
<paste in Lua program I posted>
$ lua test.lua
Created
$ vim test.lua
<remove defer() line and just 'require "ext"' directly>
$ lua test.lua
Created
GC'd
$