diff options
Diffstat (limited to 'lstrlib.c')
| -rw-r--r-- | lstrlib.c | 4 |
1 files changed, 1 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstrlib.c,v 1.119 2005/07/12 14:32:08 roberto Exp $ | 2 | ** $Id: lstrlib.c,v 1.120 2005/07/31 16:47:34 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 | */ |
| @@ -810,8 +810,6 @@ static void createmetatable (lua_State *L) { | |||
| 810 | lua_pop(L, 1); /* pop dummy string */ | 810 | lua_pop(L, 1); /* pop dummy string */ |
| 811 | lua_pushvalue(L, -2); /* string library... */ | 811 | lua_pushvalue(L, -2); /* string library... */ |
| 812 | lua_setfield(L, -2, "__index"); /* ...is the __index metamethod */ | 812 | lua_setfield(L, -2, "__index"); /* ...is the __index metamethod */ |
| 813 | lua_getfield(L, -2, "len"); | ||
| 814 | lua_setfield(L, -2, "__len"); | ||
| 815 | lua_pop(L, 1); /* pop metatable */ | 813 | lua_pop(L, 1); /* pop metatable */ |
| 816 | } | 814 | } |
| 817 | 815 | ||
