@@ -233,6 +233,17 @@ extern "C" {
233
233
/// "index" event
234
234
pub fn lua_gettable ( l : * mut lua_State , index : c_int ) ;
235
235
236
+ /// Similar to [`lua_gettable`], but does a raw access (i.e., without
237
+ /// metamethods).
238
+ /// *[-1, +1, -]*
239
+ pub fn lua_rawget ( l : * mut lua_State , index : c_int ) ;
240
+
241
+ /// Pushes onto the stack the value `t[n]`, where `t` is the value at the
242
+ /// given valid `index`. The access is *raw*; that is, it does not invoke
243
+ /// metamethods.
244
+ /// *[-0, +1, -]*
245
+ pub fn lua_rawgeti ( l : * mut lua_State , index : c_int , n : c_int ) ;
246
+
236
247
/// Does the equivalent to `t[k] = v`, where `t` is the value at the given
237
248
/// valid `index`, `v` is the value at the top of the stack, and `k` is the
238
249
/// value just below the top.
@@ -242,6 +253,19 @@ extern "C" {
242
253
/// this function may trigger a metamethod for the "newindex" event.
243
254
pub fn lua_settable ( l : * mut lua_State , index : c_int ) ;
244
255
256
+ /// Similar to [`lua_settable`], but does a raw assignment (i.e., without
257
+ /// metamethods).
258
+ /// *[-2, +0, m]*
259
+ pub fn lua_rawset ( l : * mut lua_State , index : c_int ) ;
260
+
261
+ /// Does the equivalent of `t[n] = v`, where `t` is the value at the given
262
+ /// valid `index` and `v` is the value at the top of the stack.
263
+ /// *[-1, +0, m]*
264
+ ///
265
+ /// This function pops the value from the stack. The assignment is raw; that
266
+ /// is, it does not invoke metamethods.
267
+ pub fn lua_rawseti ( l : * mut lua_State , index : c_int , n : c_int ) ;
268
+
245
269
/// Returns the type of the value in the given acceptable `index`, or
246
270
/// [`LUA_TNONE`] for a non-valid index (that is, an index to an "empty"
247
271
/// stack position). The types returned by lua_type are coded by the
0 commit comments