@@ -12,7 +12,7 @@ use num_traits::cast;
12
12
13
13
use crate :: error:: { Error , Result } ;
14
14
use crate :: function:: Function ;
15
- use crate :: lua :: { Lua , LuaInner } ;
15
+ use crate :: state :: { Lua , RawLua } ;
16
16
use crate :: string:: String ;
17
17
use crate :: table:: Table ;
18
18
use crate :: thread:: Thread ;
@@ -34,7 +34,7 @@ impl IntoLua for &Value {
34
34
}
35
35
36
36
#[ inline]
37
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
37
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
38
38
lua. push_value ( self )
39
39
}
40
40
}
@@ -60,7 +60,7 @@ impl IntoLua for &String {
60
60
}
61
61
62
62
#[ inline]
63
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
63
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
64
64
lua. push_ref ( & self . 0 ) ;
65
65
Ok ( ( ) )
66
66
}
@@ -93,7 +93,7 @@ impl IntoLua for &Table {
93
93
}
94
94
95
95
#[ inline]
96
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
96
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
97
97
lua. push_ref ( & self . 0 ) ;
98
98
Ok ( ( ) )
99
99
}
@@ -127,7 +127,7 @@ impl IntoLua for &Function {
127
127
}
128
128
129
129
#[ inline]
130
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
130
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
131
131
lua. push_ref ( & self . 0 ) ;
132
132
Ok ( ( ) )
133
133
}
@@ -161,7 +161,7 @@ impl IntoLua for &Thread {
161
161
}
162
162
163
163
#[ inline]
164
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
164
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
165
165
lua. push_ref ( & self . 0 ) ;
166
166
Ok ( ( ) )
167
167
}
@@ -195,7 +195,7 @@ impl IntoLua for &AnyUserData {
195
195
}
196
196
197
197
#[ inline]
198
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
198
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
199
199
lua. push_ref ( & self . 0 ) ;
200
200
Ok ( ( ) )
201
201
}
@@ -250,7 +250,7 @@ impl IntoLua for RegistryKey {
250
250
}
251
251
252
252
#[ inline]
253
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
253
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
254
254
<& RegistryKey >:: push_into_stack ( & self , lua)
255
255
}
256
256
}
@@ -261,7 +261,7 @@ impl IntoLua for &RegistryKey {
261
261
lua. registry_value ( self )
262
262
}
263
263
264
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
264
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
265
265
if !lua. owns_registry_value ( self ) {
266
266
return Err ( Error :: MismatchedRegistryKey ) ;
267
267
}
@@ -290,7 +290,7 @@ impl IntoLua for bool {
290
290
}
291
291
292
292
#[ inline]
293
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
293
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
294
294
ffi:: lua_pushboolean ( lua. state ( ) , self as c_int ) ;
295
295
Ok ( ( ) )
296
296
}
@@ -307,7 +307,7 @@ impl FromLua for bool {
307
307
}
308
308
309
309
#[ inline]
310
- unsafe fn from_stack ( idx : c_int , lua : & LuaInner ) -> Result < Self > {
310
+ unsafe fn from_stack ( idx : c_int , lua : & RawLua ) -> Result < Self > {
311
311
Ok ( ffi:: lua_toboolean ( lua. state ( ) , idx) != 0 )
312
312
}
313
313
}
@@ -363,7 +363,7 @@ impl IntoLua for StdString {
363
363
}
364
364
365
365
#[ inline]
366
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
366
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
367
367
push_bytes_into_stack ( self , lua)
368
368
}
369
369
}
@@ -384,7 +384,7 @@ impl FromLua for StdString {
384
384
}
385
385
386
386
#[ inline]
387
- unsafe fn from_stack ( idx : c_int , lua : & LuaInner ) -> Result < Self > {
387
+ unsafe fn from_stack ( idx : c_int , lua : & RawLua ) -> Result < Self > {
388
388
let state = lua. state ( ) ;
389
389
if ffi:: lua_type ( state, idx) == ffi:: LUA_TSTRING {
390
390
let mut size = 0 ;
@@ -410,7 +410,7 @@ impl IntoLua for &str {
410
410
}
411
411
412
412
#[ inline]
413
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
413
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
414
414
push_bytes_into_stack ( self , lua)
415
415
}
416
416
}
@@ -522,7 +522,7 @@ impl FromLua for BString {
522
522
}
523
523
}
524
524
525
- unsafe fn from_stack ( idx : c_int , lua : & LuaInner ) -> Result < Self > {
525
+ unsafe fn from_stack ( idx : c_int , lua : & RawLua ) -> Result < Self > {
526
526
let state = lua. state ( ) ;
527
527
match ffi:: lua_type ( state, idx) {
528
528
ffi:: LUA_TSTRING => {
@@ -553,7 +553,7 @@ impl IntoLua for &BStr {
553
553
}
554
554
555
555
#[ inline]
556
- unsafe fn push_bytes_into_stack < T > ( this : T , lua : & LuaInner ) -> Result < ( ) >
556
+ unsafe fn push_bytes_into_stack < T > ( this : T , lua : & RawLua ) -> Result < ( ) >
557
557
where
558
558
T : IntoLua + AsRef < [ u8 ] > ,
559
559
{
@@ -584,7 +584,7 @@ macro_rules! lua_convert_int {
584
584
}
585
585
586
586
#[ inline]
587
- unsafe fn push_into_stack( self , lua: & LuaInner ) -> Result <( ) > {
587
+ unsafe fn push_into_stack( self , lua: & RawLua ) -> Result <( ) > {
588
588
match cast( self ) {
589
589
Some ( i) => ffi:: lua_pushinteger( lua. state( ) , i) ,
590
590
None => ffi:: lua_pushnumber( lua. state( ) , self as ffi:: lua_Number) ,
@@ -881,7 +881,7 @@ impl<T: IntoLua> IntoLua for Option<T> {
881
881
}
882
882
883
883
#[ inline]
884
- unsafe fn push_into_stack ( self , lua : & LuaInner ) -> Result < ( ) > {
884
+ unsafe fn push_into_stack ( self , lua : & RawLua ) -> Result < ( ) > {
885
885
match self {
886
886
Some ( val) => val. push_into_stack ( lua) ?,
887
887
None => ffi:: lua_pushnil ( lua. state ( ) ) ,
@@ -900,7 +900,7 @@ impl<T: FromLua> FromLua for Option<T> {
900
900
}
901
901
902
902
#[ inline]
903
- unsafe fn from_stack ( idx : c_int , lua : & LuaInner ) -> Result < Self > {
903
+ unsafe fn from_stack ( idx : c_int , lua : & RawLua ) -> Result < Self > {
904
904
if ffi:: lua_isnil ( lua. state ( ) , idx) != 0 {
905
905
Ok ( None )
906
906
} else {
0 commit comments