lua-users home
lua-l archive

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

I’m porting Lua to our embedded system and I’m having problems during initialisation.


Is there anything I need to call except lua_open() on initialisation?



In pseudo code it goes like this:

L = lua_open();

  lua_gc(L, LUA_GCSTOP, 0);  /* stop collector during initialization */

  luaL_openlibs(L);  /* open lua libraries (also for GCW_DBL) */

    lua_pushstring(L, lib->name);

luaS_newlstr(L, “”, 0);


When the code gets to:

for (o = G(L)->strt.hash[lmod(h, G(L)->strt.size)];


L->strt.hash is NULL which is obviously wrong.  It looks like the GC isn’t initialised.


Anyone got any ideas?




This e-mail and any files transmitted with it ("E-mail") is intended solely for the addressee(s)
and may contain confidential and/or legally privileged information. If you are not the addressee(s), any
disclosure, reproduction, copying, distribution or other use of the E-mail is prohibited. If you have received
this E-mail in error, please delete it and notify the sender immediately via our switchboard or return e-mail.

Neither the company nor any subsidiary or affiliate or associated company nor any individual sending this E-mail
accepts any liability in respect of the content (including errors and omissions) nor shall this e-mail be deemed
to enter the company or any subsidiary or affiliate or associated company into a contract or to create any
legally binding obligations unless expressly agreed to in writing under separate cover and timeliness of the
E-mail which arise as a result of transmission. If verification is required, please request a hard copy version
from the sender.