# 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,
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 {}
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 {
pub fn pushinteger(&self, val: i64) {
unsafe {
- lua_pushinteger(self.lua, val as LuaInteger);
+ lua_pushinteger(self.lua, val);
}
}
}