diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-19 15:04:41 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-19 15:04:41 -0300 |
| commit | 8d2baf719cf8687dba1648da4c5d9450d0bb2c14 (patch) | |
| tree | 53fb2b77310f52126c64270e2993664455e608d2 | |
| parent | 88657809acdfd51f3ff92b66a48699045b72902e (diff) | |
| download | lua-8d2baf719cf8687dba1648da4c5d9450d0bb2c14.tar.gz lua-8d2baf719cf8687dba1648da4c5d9450d0bb2c14.tar.bz2 lua-8d2baf719cf8687dba1648da4c5d9450d0bb2c14.zip | |
comment
Diffstat (limited to '')
| -rw-r--r-- | lvm.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.114 2000/06/08 17:48:31 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.115 2000/06/12 13:52:05 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -180,8 +180,10 @@ void luaV_setglobal (lua_State *L, TString *s, StkId top) { | |||
| 180 | const TObject *oldvalue = luaH_getstr(L->gt, s); | 180 | const TObject *oldvalue = luaH_getstr(L->gt, s); |
| 181 | const TObject *im = luaT_getimbyObj(L, oldvalue, IM_SETGLOBAL); | 181 | const TObject *im = luaT_getimbyObj(L, oldvalue, IM_SETGLOBAL); |
| 182 | if (ttype(im) == TAG_NIL) { /* is there a tag method? */ | 182 | if (ttype(im) == TAG_NIL) { /* is there a tag method? */ |
| 183 | if (oldvalue != &luaO_nilobject) | 183 | if (oldvalue != &luaO_nilobject) { |
| 184 | /* cast to remove `const' is OK, because `oldvalue' != luaO_nilobject */ | ||
| 184 | *(TObject *)oldvalue = *(top-1); | 185 | *(TObject *)oldvalue = *(top-1); |
| 186 | } | ||
| 185 | else { | 187 | else { |
| 186 | TObject key; | 188 | TObject key; |
| 187 | ttype(&key) = TAG_STRING; | 189 | ttype(&key) = TAG_STRING; |
