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); }