@@ -69,8 +69,11 @@ pub const LUA_MINSTACK: c_int = 20;
69
69
/// A Lua number, usually equivalent to `f64`.
70
70
pub type lua_Number = c_double ;
71
71
72
- /// A Lua integer, equivalent to `i32`.
73
- pub type lua_Integer = c_int ;
72
+ /// A Lua integer, usually equivalent to `i64`
73
+ #[ cfg( target_pointer_width = "32" ) ]
74
+ pub type lua_Integer = i32 ;
75
+ #[ cfg( target_pointer_width = "64" ) ]
76
+ pub type lua_Integer = i64 ;
74
77
75
78
/// A Lua unsigned integer, equivalent to `u32`.
76
79
pub type lua_Unsigned = c_uint ;
@@ -136,7 +139,7 @@ extern "C-unwind" {
136
139
137
140
pub fn lua_tonumberx ( L : * mut lua_State , idx : c_int , isnum : * mut c_int ) -> lua_Number ;
138
141
#[ link_name = "lua_tointegerx" ]
139
- pub fn lua_tointegerx_ ( L : * mut lua_State , idx : c_int , isnum : * mut c_int ) -> lua_Integer ;
142
+ pub fn lua_tointegerx_ ( L : * mut lua_State , idx : c_int , isnum : * mut c_int ) -> c_int ;
140
143
pub fn lua_tounsignedx ( L : * mut lua_State , idx : c_int , isnum : * mut c_int ) -> lua_Unsigned ;
141
144
pub fn lua_tovector ( L : * mut lua_State , idx : c_int ) -> * const c_float ;
142
145
pub fn lua_toboolean ( L : * mut lua_State , idx : c_int ) -> c_int ;
@@ -160,7 +163,8 @@ extern "C-unwind" {
160
163
//
161
164
pub fn lua_pushnil ( L : * mut lua_State ) ;
162
165
pub fn lua_pushnumber ( L : * mut lua_State , n : lua_Number ) ;
163
- pub fn lua_pushinteger ( L : * mut lua_State , n : lua_Integer ) ;
166
+ #[ link_name = "lua_pushinteger" ]
167
+ pub fn lua_pushinteger_ ( L : * mut lua_State , n : c_int ) ;
164
168
pub fn lua_pushunsigned ( L : * mut lua_State , n : lua_Unsigned ) ;
165
169
#[ cfg( not( feature = "luau-vector4" ) ) ]
166
170
pub fn lua_pushvector ( L : * mut lua_State , x : c_float , y : c_float , z : c_float ) ;
@@ -310,13 +314,13 @@ extern "C-unwind" {
310
314
//
311
315
312
316
#[ inline( always) ]
313
- pub unsafe fn lua_tonumber ( L : * mut lua_State , i : c_int ) -> lua_Number {
314
- lua_tonumberx ( L , i , ptr:: null_mut ( ) )
317
+ pub unsafe fn lua_tonumber ( L : * mut lua_State , idx : c_int ) -> lua_Number {
318
+ lua_tonumberx ( L , idx , ptr:: null_mut ( ) )
315
319
}
316
320
317
321
#[ inline( always) ]
318
- pub unsafe fn lua_tointeger_ ( L : * mut lua_State , i : c_int ) -> lua_Integer {
319
- lua_tointegerx_ ( L , i , ptr:: null_mut ( ) )
322
+ pub unsafe fn lua_tointeger_ ( L : * mut lua_State , idx : c_int ) -> c_int {
323
+ lua_tointegerx_ ( L , idx , ptr:: null_mut ( ) )
320
324
}
321
325
322
326
#[ inline( always) ]
0 commit comments