[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: reviving the ao luarock
- From: Daurnimator <quae@...>
- Date: Thu, 3 Aug 2017 12:36:17 +1000
On 3 August 2017 at 11:51, Peter Billam <firstname.lastname@example.org> wrote:
> Greeitngs. I hope this is the appropriate forum...
> Judging from http://thelinx.github.io/lao/
> ao is just exactly what I need :-)
> so I tried luarocks install ao and got
> ao> lua ao_example.lua
> lua: error loading module 'ao' from file '/usr/local/lib/lua/5.2/ao.so':
> /usr/local/lib/lua/5.2/ao.so: undefined symbol: luaL_register
> so presumably it needs something like what I normally use:
> #if LUA_VERSION_NUM >= 502
> luaL_setfuncs(L, prv, 0); /* 5.2 */
> return 0;
> luaL_register(L, NULL, prv); /* 5.1 */
> return 0;
> so I did
> git clone https://github.com/thelinx/lao
> and in src/lao.c I tried to replace the
> luaL_register(L, "ao", ao);
> line, but couldn't get it compiled because the way lao.c returns the
> module is different ... it's probably elementary ...
> It's a shame that such a neat little module isn't maintained any more.
> I could probably coerce it into my usual way of doing things,
> but I'm a bit old to take on more modules. And I'm not sure
> that anyone's listening for pull requests on thelinx/lao
> Suggestions gratefully received...
Looks like luaL_register should be replaced here with luaL_newlib
Examples should then be rewritten to do: local ao = require "ao"