code: func (l *State) UserValue(index int) {
  	d := l.indexToValue(index).(*userData)
  	if d.env == nil {
  		l.apiPush(nil)
  	} else {
  		l.apiPush(d.env)
  	}
  }
docs: // 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