From 8d2baf719cf8687dba1648da4c5d9450d0bb2c14 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 19 Jun 2000 15:04:41 -0300 Subject: [PATCH] comment --- lvm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lvm.c b/lvm.c index c15385a4..1a21a116 100644 --- a/lvm.c +++ b/lvm.c @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 1.114 2000/06/08 17:48:31 roberto Exp roberto $ +** $Id: lvm.c,v 1.115 2000/06/12 13:52:05 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -180,8 +180,10 @@ void luaV_setglobal (lua_State *L, TString *s, StkId top) { const TObject *oldvalue = luaH_getstr(L->gt, s); const TObject *im = luaT_getimbyObj(L, oldvalue, IM_SETGLOBAL); if (ttype(im) == TAG_NIL) { /* is there a tag method? */ - if (oldvalue != &luaO_nilobject) + if (oldvalue != &luaO_nilobject) { + /* cast to remove `const' is OK, because `oldvalue' != luaO_nilobject */ *(TObject *)oldvalue = *(top-1); + } else { TObject key; ttype(&key) = TAG_STRING;