Comparison

util-src/pposix.c @ 6411:6c8f6364bc48

util-src/*.c: Don't create globals when loaded
author Kim Alvefur <zash@zash.se>
date Tue, 16 Sep 2014 21:56:18 +0200
parent 6156:6b1aee6536e8
child 6413:a552f4170aed
comparison
equal deleted inserted replaced
6407:4bbd198cf3e6 6411:6c8f6364bc48
766 #endif 766 #endif
767 767
768 { NULL, NULL } 768 { NULL, NULL }
769 }; 769 };
770 770
771 luaL_register(L, "pposix", exports); 771 lua_newtable(L);
772 luaL_register(L, NULL, exports);
772 773
773 lua_pushliteral(L, "pposix"); 774 lua_pushliteral(L, "pposix");
774 lua_setfield(L, -2, "_NAME"); 775 lua_setfield(L, -2, "_NAME");
775 776
776 lua_pushliteral(L, MODULE_VERSION); 777 lua_pushliteral(L, MODULE_VERSION);