AdUki / LuaState

Lua51-52 binding library
Apache License 2.0
77 stars 14 forks source link

Keys are pushed to stack #2

Closed AdUki closed 10 years ago

AdUki commented 10 years ago

I don't know if this can be resolved, but operator[char* k] is automaticaly push k value to stack, because there is no way to find out if user wants to set value or get value.

Can be resolved by providing to operations for getting and setting or maybe by lot of template magic...

Example:

state["var"] = 100

lua::Value value = state["var"];
// Stack is: `var` 100