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. --- lstrlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lstrlib.c') diff --git a/lstrlib.c b/lstrlib.c index 565d913e..79b3ab37 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.152 2010/05/04 17:20:33 roberto Exp roberto $ +** $Id: lstrlib.c,v 1.153 2010/05/24 19:34:57 roberto Exp roberto $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -913,7 +913,7 @@ static void createmetatable (lua_State *L) { ** Open string library */ LUAMOD_API int luaopen_string (lua_State *L) { - luaL_register(L, LUA_STRLIBNAME, strlib); + luaL_newlib(L, strlib); createmetatable(L); return 1; } -- cgit v1.2.3-55-g6feb