diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-08-09 14:42:02 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-08-09 14:42:02 -0300 |
commit | 894cd31c5227fd4061f6eb2bd6140c540946d394 (patch) | |
tree | c5c0e9eac0fd9ccb65ae19944d64d4bd7edfbab2 /lstrlib.c | |
parent | f01a95d4a00d8cef8283f963c8dfaed0fb7d816d (diff) | |
download | lua-894cd31c5227fd4061f6eb2bd6140c540946d394.tar.gz lua-894cd31c5227fd4061f6eb2bd6140c540946d394.tar.bz2 lua-894cd31c5227fd4061f6eb2bd6140c540946d394.zip |
#string is primitive
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 | ||