@@ -95,7 +95,7 @@ int MetaDataRef::l_get_int(lua_State *L)
95
95
MAP_LOCK_REQUIRED;
96
96
97
97
MetaDataRef *ref = checkobject (L, 1 );
98
- std::string name = lua_tostring (L, 2 );
98
+ std::string name = luaL_checkstring (L, 2 );
99
99
100
100
Metadata *meta = ref->getmeta (false );
101
101
if (meta == NULL ) {
@@ -114,8 +114,8 @@ int MetaDataRef::l_set_int(lua_State *L)
114
114
MAP_LOCK_REQUIRED;
115
115
116
116
MetaDataRef *ref = checkobject (L, 1 );
117
- std::string name = lua_tostring (L, 2 );
118
- int a = lua_tointeger (L, 3 );
117
+ std::string name = luaL_checkstring (L, 2 );
118
+ int a = luaL_checkint (L, 3 );
119
119
std::string str = itos (a);
120
120
121
121
Metadata *meta = ref->getmeta (true );
@@ -133,7 +133,7 @@ int MetaDataRef::l_get_float(lua_State *L)
133
133
MAP_LOCK_REQUIRED;
134
134
135
135
MetaDataRef *ref = checkobject (L, 1 );
136
- std::string name = lua_tostring (L, 2 );
136
+ std::string name = luaL_checkstring (L, 2 );
137
137
138
138
Metadata *meta = ref->getmeta (false );
139
139
if (meta == NULL ) {
@@ -152,8 +152,8 @@ int MetaDataRef::l_set_float(lua_State *L)
152
152
MAP_LOCK_REQUIRED;
153
153
154
154
MetaDataRef *ref = checkobject (L, 1 );
155
- std::string name = lua_tostring (L, 2 );
156
- float a = lua_tonumber (L, 3 );
155
+ std::string name = luaL_checkstring (L, 2 );
156
+ float a = luaL_checknumber (L, 3 );
157
157
std::string str = ftos (a);
158
158
159
159
Metadata *meta = ref->getmeta (true );
0 commit comments