@@ -69,8 +69,11 @@ pub const LUA_MINSTACK: c_int = 20;
6969/// A Lua number, usually equivalent to `f64`.
7070pub type lua_Number = c_double ;
7171
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 ;
7477
7578/// A Lua unsigned integer, equivalent to `u32`.
7679pub type lua_Unsigned = c_uint ;
@@ -136,7 +139,7 @@ extern "C-unwind" {
136139
137140 pub fn lua_tonumberx ( L : * mut lua_State , idx : c_int , isnum : * mut c_int ) -> lua_Number ;
138141 #[ 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 ;
140143 pub fn lua_tounsignedx ( L : * mut lua_State , idx : c_int , isnum : * mut c_int ) -> lua_Unsigned ;
141144 pub fn lua_tovector ( L : * mut lua_State , idx : c_int ) -> * const c_float ;
142145 pub fn lua_toboolean ( L : * mut lua_State , idx : c_int ) -> c_int ;
@@ -160,7 +163,8 @@ extern "C-unwind" {
160163 //
161164 pub fn lua_pushnil ( L : * mut lua_State ) ;
162165 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 ) ;
164168 pub fn lua_pushunsigned ( L : * mut lua_State , n : lua_Unsigned ) ;
165169 #[ cfg( not( feature = "luau-vector4" ) ) ]
166170 pub fn lua_pushvector ( L : * mut lua_State , x : c_float , y : c_float , z : c_float ) ;
@@ -310,13 +314,13 @@ extern "C-unwind" {
310314//
311315
312316#[ 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 ( ) )
315319}
316320
317321#[ 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 ( ) )
320324}
321325
322326#[ inline( always) ]
0 commit comments