From 7192afafeeb1a96b3de60af90a72cd8762b09d94 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 2 Jul 2010 08:38:13 -0300 Subject: new module policy: C modules do not create globals and do not register themselves with 'require' (let 'require' do its work); new auxiliary functions luaL_newlib/luaL_newlibtable/luaL_setfuncs/luaL_requiref. Old luaL_register will be deprecated. --- lcorolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lcorolib.c') diff --git a/lcorolib.c b/lcorolib.c index fdcbc6de..1eef89c9 100644 --- a/lcorolib.c +++ b/lcorolib.c @@ -1,5 +1,5 @@ /* -** $Id: lcorolib.c,v $ +** $Id: lcorolib.c,v 1.1 2010/06/10 21:30:26 roberto Exp roberto $ ** Coroutine Library ** See Copyright Notice in lua.h */ @@ -148,7 +148,7 @@ static const luaL_Reg co_funcs[] = { LUAMOD_API int luaopen_coroutine (lua_State *L) { - luaL_register(L, LUA_COLIBNAME, co_funcs); + luaL_newlib(L, co_funcs); return 1; } -- cgit v1.2.3-55-g6feb