rust/lua: remove lua_int8 feature

Now that we're fixed to Lua 5.4, the integer size is always 8.
pull/11165/head
Jason Ish 2 years ago
parent bc011f2205
commit 1fd2c1a379

@ -1875,7 +1875,6 @@
# TODO: Update the code to not require this.
AC_DEFINE([HAVE_LUA], [1], [lua support available])
AM_CONDITIONAL([HAVE_LUA], [true])
AC_SUBST([LUA_INT8], ["lua_int8"])
# libmaxminddb
AC_ARG_ENABLE(geoip,

@ -18,7 +18,6 @@ debug = true
[features]
lua = []
lua_int8 = ["lua"]
strict = []
debug = []
debug-validate = []

@ -21,12 +21,6 @@ use std::os::raw::c_char;
use std::os::raw::c_int;
use std::os::raw::c_long;
#[cfg(feature = "lua_int8")]
type LuaInteger = i64;
#[cfg(not(feature = "lua_int8"))]
type LuaInteger = i32;
/// The Rust place holder for lua_State.
pub enum CLuaState {}
@ -34,7 +28,7 @@ extern {
fn lua_createtable(lua: *mut CLuaState, narr: c_int, nrec: c_int);
fn lua_settable(lua: *mut CLuaState, idx: c_long);
fn lua_pushlstring(lua: *mut CLuaState, s: *const c_char, len: usize);
fn lua_pushinteger(lua: *mut CLuaState, n: LuaInteger);
fn lua_pushinteger(lua: *mut CLuaState, n: i64);
}
pub struct LuaState {
@ -63,7 +57,7 @@ impl LuaState {
pub fn pushinteger(&self, val: i64) {
unsafe {
lua_pushinteger(self.lua, val as LuaInteger);
lua_pushinteger(self.lua, val);
}
}
}

Loading…
Cancel
Save