lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

thanx :) might be I'll dive some into the Lua source to see it all for

----- Original Message -----
From: "Wim Couwenberg" <>
To: "Lua list" <>
Sent: Sunday, June 01, 2003 10:20 PM
Subject: Re: Lua5 local scoping

> > Does this mean,
> > that the VM code is somehow altered for the function that goes out of
> > scope?
> Functions that are exported out of (and hence survive) a scope you mean.
> No, not the VM code itself changes, only a pointer to where the value
> resides. (Being a stack slot or the private structure value.  This pointer
> is in fact part of this private upvalue structure.)  Lua byte code always
> remains unchanged.  Only local values, upvalues, table entries (including
> the global environment), metatables and closure environments can be
> (From Lua scripts that is, the C API can change userdata as well.)
> Bye,
> Wim