diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-07-02 08:38:13 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-07-02 08:38:13 -0300 |
| commit | 7192afafeeb1a96b3de60af90a72cd8762b09d94 (patch) | |
| tree | d1e7e061822f755c33cc497d98ea451c7e7e32e8 /lstrlib.c | |
| parent | a139e2e003e0b62b7d34eeda20dd2354e74885f9 (diff) | |
| download | lua-7192afafeeb1a96b3de60af90a72cd8762b09d94.tar.gz lua-7192afafeeb1a96b3de60af90a72cd8762b09d94.tar.bz2 lua-7192afafeeb1a96b3de60af90a72cd8762b09d94.zip | |
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.
Diffstat (limited to 'lstrlib.c')
| -rw-r--r-- | lstrlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstrlib.c,v 1.152 2010/05/04 17:20:33 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.153 2010/05/24 19:34:57 roberto Exp roberto $ |
| 3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -913,7 +913,7 @@ static void createmetatable (lua_State *L) { | |||
| 913 | ** Open string library | 913 | ** Open string library |
| 914 | */ | 914 | */ |
| 915 | LUAMOD_API int luaopen_string (lua_State *L) { | 915 | LUAMOD_API int luaopen_string (lua_State *L) { |
| 916 | luaL_register(L, LUA_STRLIBNAME, strlib); | 916 | luaL_newlib(L, strlib); |
| 917 | createmetatable(L); | 917 | createmetatable(L); |
| 918 | return 1; | 918 | return 1; |
| 919 | } | 919 | } |
