X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FScript.hh;fp=src%2FMoof%2FScript.hh;h=2fe275e161aae3a7bd0e14bd15d94dd7907692cb;hp=553e31a0717be1b242a5e0f8a2377212f4492157;hb=23d8f7a5fbd1eca7f46f2342c20ac5e28ae0128a;hpb=fa9438c66ae0154e6d9ad196e0fb39649d359da4 diff --git a/src/Moof/Script.hh b/src/Moof/Script.hh index 553e31a..2fe275e 100644 --- a/src/Moof/Script.hh +++ b/src/Moof/Script.hh @@ -126,6 +126,18 @@ struct Script index(i), state(s) {} + /** + * A copied value presently points to the same value, except the real + * index is used. That means that if a value that refers to a frame + * referenced from the top of the stack will have its normalized index + * copied into the new value object. + */ + + Value(const Value& copy) : + index(copy.getRealIndex()), + state(copy.state) {} + + // check the type of the value bool isBoolean() const { return (bool)lua_isboolean(state, index); } bool isFunction() const { return (bool)lua_isfunction(state, index); }