UserValue pushes onto the stack the Lua value associated with the userdata at index. This value must be a table or nil. http://www.lua.org/manual/5.2/manual.html#lua_getuservalue
(index int)
| 1067 | // |
| 1068 | // http://www.lua.org/manual/5.2/manual.html#lua_getuservalue |
| 1069 | func (l *State) UserValue(index int) { |
| 1070 | d := l.indexToValue(index).(*userData) |
| 1071 | if d.env == nil { |
| 1072 | l.apiPush(nil) |
| 1073 | } else { |
| 1074 | l.apiPush(d.env) |
| 1075 | } |
| 1076 | } |
| 1077 | |
| 1078 | // SetGlobal pops a value from the stack and sets it as the new value of |
| 1079 | // global name. |
no test coverage detected