/* automatically generated by rust-bindgen */

pub const __llvm__: ::libc::c_uchar = 1;
pub const __clang__: ::libc::c_uchar = 1;
pub const __clang_major__: ::libc::c_uchar = 3;
pub const __clang_minor__: ::libc::c_uchar = 8;
pub const __clang_patchlevel__: ::libc::c_uchar = 0;
pub const __GNUC_MINOR__: ::libc::c_uchar = 2;
pub const __GNUC_PATCHLEVEL__: ::libc::c_uchar = 1;
pub const __GNUC__: ::libc::c_uchar = 4;
pub const __GXX_ABI_VERSION: ::libc::c_ushort = 1002;
pub const __ATOMIC_RELAXED: ::libc::c_uchar = 0;
pub const __ATOMIC_CONSUME: ::libc::c_uchar = 1;
pub const __ATOMIC_ACQUIRE: ::libc::c_uchar = 2;
pub const __ATOMIC_RELEASE: ::libc::c_uchar = 3;
pub const __ATOMIC_ACQ_REL: ::libc::c_uchar = 4;
pub const __ATOMIC_SEQ_CST: ::libc::c_uchar = 5;
pub const __PRAGMA_REDEFINE_EXTNAME: ::libc::c_uchar = 1;
pub const __CONSTANT_CFSTRINGS__: ::libc::c_uchar = 1;
pub const __GXX_RTTI: ::libc::c_uchar = 1;
pub const __ORDER_LITTLE_ENDIAN__: ::libc::c_ushort = 1234;
pub const __ORDER_BIG_ENDIAN__: ::libc::c_ushort = 4321;
pub const __ORDER_PDP_ENDIAN__: ::libc::c_ushort = 3412;
pub const __BYTE_ORDER__: ::libc::c_ushort = 1234;
pub const __LITTLE_ENDIAN__: ::libc::c_uchar = 1;
pub const _LP64: ::libc::c_uchar = 1;
pub const __LP64__: ::libc::c_uchar = 1;
pub const __CHAR_BIT__: ::libc::c_uchar = 8;
pub const __SCHAR_MAX__: ::libc::c_uchar = 127;
pub const __SHRT_MAX__: ::libc::c_ushort = 32767;
pub const __INT_MAX__: ::libc::c_uint = 2147483647;
pub const __LONG_MAX__: ::libc::c_ulonglong = 9223372036854775807;
pub const __LONG_LONG_MAX__: ::libc::c_ulonglong = 9223372036854775807;
pub const __WCHAR_MAX__: ::libc::c_uint = 2147483647;
pub const __INTMAX_MAX__: ::libc::c_ulonglong = 9223372036854775807;
pub const __PTRDIFF_MAX__: ::libc::c_ulonglong = 9223372036854775807;
pub const __INTPTR_MAX__: ::libc::c_ulonglong = 9223372036854775807;
pub const __SIZEOF_DOUBLE__: ::libc::c_uchar = 8;
pub const __SIZEOF_FLOAT__: ::libc::c_uchar = 4;
pub const __SIZEOF_INT__: ::libc::c_uchar = 4;
pub const __SIZEOF_LONG__: ::libc::c_uchar = 8;
pub const __SIZEOF_LONG_DOUBLE__: ::libc::c_uchar = 16;
pub const __SIZEOF_LONG_LONG__: ::libc::c_uchar = 8;
pub const __SIZEOF_POINTER__: ::libc::c_uchar = 8;
pub const __SIZEOF_SHORT__: ::libc::c_uchar = 2;
pub const __SIZEOF_PTRDIFF_T__: ::libc::c_uchar = 8;
pub const __SIZEOF_SIZE_T__: ::libc::c_uchar = 8;
pub const __SIZEOF_WCHAR_T__: ::libc::c_uchar = 4;
pub const __SIZEOF_WINT_T__: ::libc::c_uchar = 4;
pub const __SIZEOF_INT128__: ::libc::c_uchar = 16;
pub const __INTMAX_WIDTH__: ::libc::c_uchar = 64;
pub const __PTRDIFF_WIDTH__: ::libc::c_uchar = 64;
pub const __INTPTR_WIDTH__: ::libc::c_uchar = 64;
pub const __SIZE_WIDTH__: ::libc::c_uchar = 64;
pub const __WCHAR_WIDTH__: ::libc::c_uchar = 32;
pub const __WINT_WIDTH__: ::libc::c_uchar = 32;
pub const __SIG_ATOMIC_WIDTH__: ::libc::c_uchar = 32;
pub const __SIG_ATOMIC_MAX__: ::libc::c_uint = 2147483647;
pub const __UINTMAX_WIDTH__: ::libc::c_uchar = 64;
pub const __UINTPTR_WIDTH__: ::libc::c_uchar = 64;
pub const __FLT_HAS_DENORM__: ::libc::c_uchar = 1;
pub const __FLT_DIG__: ::libc::c_uchar = 6;
pub const __FLT_DECIMAL_DIG__: ::libc::c_uchar = 9;
pub const __FLT_HAS_INFINITY__: ::libc::c_uchar = 1;
pub const __FLT_HAS_QUIET_NAN__: ::libc::c_uchar = 1;
pub const __FLT_MANT_DIG__: ::libc::c_uchar = 24;
pub const __FLT_MAX_10_EXP__: ::libc::c_uchar = 38;
pub const __FLT_MAX_EXP__: ::libc::c_uchar = 128;
pub const __DBL_HAS_DENORM__: ::libc::c_uchar = 1;
pub const __DBL_DIG__: ::libc::c_uchar = 15;
pub const __DBL_DECIMAL_DIG__: ::libc::c_uchar = 17;
pub const __DBL_HAS_INFINITY__: ::libc::c_uchar = 1;
pub const __DBL_HAS_QUIET_NAN__: ::libc::c_uchar = 1;
pub const __DBL_MANT_DIG__: ::libc::c_uchar = 53;
pub const __DBL_MAX_10_EXP__: ::libc::c_ushort = 308;
pub const __DBL_MAX_EXP__: ::libc::c_ushort = 1024;
pub const __DBL_MIN_10_EXP__: ::libc::c_short = -307;
pub const __DBL_MIN_EXP__: ::libc::c_short = -1021;
pub const __LDBL_HAS_DENORM__: ::libc::c_uchar = 1;
pub const __LDBL_DIG__: ::libc::c_uchar = 18;
pub const __LDBL_DECIMAL_DIG__: ::libc::c_uchar = 21;
pub const __LDBL_HAS_INFINITY__: ::libc::c_uchar = 1;
pub const __LDBL_HAS_QUIET_NAN__: ::libc::c_uchar = 1;
pub const __LDBL_MANT_DIG__: ::libc::c_uchar = 64;
pub const __LDBL_MAX_10_EXP__: ::libc::c_ushort = 4932;
pub const __LDBL_MAX_EXP__: ::libc::c_ushort = 16384;
pub const __LDBL_MIN_10_EXP__: ::libc::c_short = -4931;
pub const __LDBL_MIN_EXP__: ::libc::c_short = -16381;
pub const __POINTER_WIDTH__: ::libc::c_uchar = 64;
pub const __BIGGEST_ALIGNMENT__: ::libc::c_uchar = 16;
pub const __WINT_UNSIGNED__: ::libc::c_uchar = 1;
pub const __UINT8_MAX__: ::libc::c_uchar = 255;
pub const __INT8_MAX__: ::libc::c_uchar = 127;
pub const __UINT16_MAX__: ::libc::c_ushort = 65535;
pub const __INT16_MAX__: ::libc::c_ushort = 32767;
pub const __UINT32_MAX__: ::libc::c_uint = 4294967295;
pub const __INT32_MAX__: ::libc::c_uint = 2147483647;
pub const __INT64_MAX__: ::libc::c_ulonglong = 9223372036854775807;
pub const __INT_LEAST8_MAX__: ::libc::c_uchar = 127;
pub const __UINT_LEAST8_MAX__: ::libc::c_uchar = 255;
pub const __INT_LEAST16_MAX__: ::libc::c_ushort = 32767;
pub const __UINT_LEAST16_MAX__: ::libc::c_ushort = 65535;
pub const __INT_LEAST32_MAX__: ::libc::c_uint = 2147483647;
pub const __UINT_LEAST32_MAX__: ::libc::c_uint = 4294967295;
pub const __INT_LEAST64_MAX__: ::libc::c_ulonglong = 9223372036854775807;
pub const __INT_FAST8_MAX__: ::libc::c_uchar = 127;
pub const __UINT_FAST8_MAX__: ::libc::c_uchar = 255;
pub const __INT_FAST16_MAX__: ::libc::c_ushort = 32767;
pub const __UINT_FAST16_MAX__: ::libc::c_ushort = 65535;
pub const __INT_FAST32_MAX__: ::libc::c_uint = 2147483647;
pub const __UINT_FAST32_MAX__: ::libc::c_uint = 4294967295;
pub const __INT_FAST64_MAX__: ::libc::c_ulonglong = 9223372036854775807;
pub const __FINITE_MATH_ONLY__: ::libc::c_uchar = 0;
pub const __GNUC_STDC_INLINE__: ::libc::c_uchar = 1;
pub const __GCC_ATOMIC_TEST_AND_SET_TRUEVAL: ::libc::c_uchar = 1;
pub const __GCC_ATOMIC_BOOL_LOCK_FREE: ::libc::c_uchar = 2;
pub const __GCC_ATOMIC_CHAR_LOCK_FREE: ::libc::c_uchar = 2;
pub const __GCC_ATOMIC_CHAR16_T_LOCK_FREE: ::libc::c_uchar = 2;
pub const __GCC_ATOMIC_CHAR32_T_LOCK_FREE: ::libc::c_uchar = 2;
pub const __GCC_ATOMIC_WCHAR_T_LOCK_FREE: ::libc::c_uchar = 2;
pub const __GCC_ATOMIC_SHORT_LOCK_FREE: ::libc::c_uchar = 2;
pub const __GCC_ATOMIC_INT_LOCK_FREE: ::libc::c_uchar = 2;
pub const __GCC_ATOMIC_LONG_LOCK_FREE: ::libc::c_uchar = 2;
pub const __GCC_ATOMIC_LLONG_LOCK_FREE: ::libc::c_uchar = 2;
pub const __GCC_ATOMIC_POINTER_LOCK_FREE: ::libc::c_uchar = 2;
pub const __NO_INLINE__: ::libc::c_uchar = 1;
pub const __FLT_EVAL_METHOD__: ::libc::c_uchar = 0;
pub const __FLT_RADIX__: ::libc::c_uchar = 2;
pub const __DECIMAL_DIG__: ::libc::c_uchar = 21;
pub const __amd64__: ::libc::c_uchar = 1;
pub const __amd64: ::libc::c_uchar = 1;
pub const __x86_64: ::libc::c_uchar = 1;
pub const __x86_64__: ::libc::c_uchar = 1;
pub const __k8: ::libc::c_uchar = 1;
pub const __k8__: ::libc::c_uchar = 1;
pub const __tune_k8__: ::libc::c_uchar = 1;
pub const __NO_MATH_INLINES: ::libc::c_uchar = 1;
pub const __FXSR__: ::libc::c_uchar = 1;
pub const __SSE2__: ::libc::c_uchar = 1;
pub const __SSE2_MATH__: ::libc::c_uchar = 1;
pub const __SSE__: ::libc::c_uchar = 1;
pub const __SSE_MATH__: ::libc::c_uchar = 1;
pub const __MMX__: ::libc::c_uchar = 1;
pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1: ::libc::c_uchar = 1;
pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2: ::libc::c_uchar = 1;
pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4: ::libc::c_uchar = 1;
pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8: ::libc::c_uchar = 1;
pub const unix: ::libc::c_uchar = 1;
pub const __unix: ::libc::c_uchar = 1;
pub const __unix__: ::libc::c_uchar = 1;
pub const linux: ::libc::c_uchar = 1;
pub const __linux: ::libc::c_uchar = 1;
pub const __linux__: ::libc::c_uchar = 1;
pub const __gnu_linux__: ::libc::c_uchar = 1;
pub const __ELF__: ::libc::c_uchar = 1;
pub const __STDC__: ::libc::c_uchar = 1;
pub const __STDC_HOSTED__: ::libc::c_uchar = 1;
pub const __STDC_VERSION__: ::libc::c_uint = 201112;
pub const __STDC_UTF_16__: ::libc::c_uchar = 1;
pub const __STDC_UTF_32__: ::libc::c_uchar = 1;
pub const __GNUC_VA_LIST: ::libc::c_uchar = 1;
pub const WINVER: ::libc::c_ushort = 1281;
pub const LUAI_MAXSTACK: ::libc::c_ushort = 65500;
pub const LUAI_MAXCSTACK: ::libc::c_ushort = 8000;
pub const LUAI_GCPAUSE: ::libc::c_uchar = 200;
pub const LUAI_GCMUL: ::libc::c_uchar = 200;
pub const LUA_MAXCAPTURES: ::libc::c_uchar = 32;
pub const LUA_IDSIZE: ::libc::c_uchar = 60;
pub const LUAI_MAXNUMBER2STR: ::libc::c_uchar = 32;
pub const LUA_VERSION_NUM: ::libc::c_ushort = 501;
pub const LUA_MULTRET: ::libc::c_char = (-1) as _;
pub const LUA_REGISTRYINDEX: ::libc::c_short = -10000;
pub const LUA_ENVIRONINDEX: ::libc::c_short = -10001;
pub const LUA_GLOBALSINDEX: ::libc::c_short = -10002;
pub const LUA_YIELD: ::libc::c_uchar = 1;
pub const LUA_ERRRUN: ::libc::c_uchar = 2;
pub const LUA_ERRSYNTAX: ::libc::c_uchar = 3;
pub const LUA_ERRMEM: ::libc::c_uchar = 4;
pub const LUA_ERRERR: ::libc::c_uchar = 5;
pub const LUA_TNONE: ::libc::c_char = (-1) as _;
pub const LUA_TNIL: ::libc::c_uchar = 0;
pub const LUA_TBOOLEAN: ::libc::c_uchar = 1;
pub const LUA_TLIGHTUSERDATA: ::libc::c_uchar = 2;
pub const LUA_TNUMBER: ::libc::c_uchar = 3;
pub const LUA_TSTRING: ::libc::c_uchar = 4;
pub const LUA_TTABLE: ::libc::c_uchar = 5;
pub const LUA_TFUNCTION: ::libc::c_uchar = 6;
pub const LUA_TUSERDATA: ::libc::c_uchar = 7;
pub const LUA_TTHREAD: ::libc::c_uchar = 8;
pub const LUA_MINSTACK: ::libc::c_uchar = 20;
pub const LUA_GCSTOP: ::libc::c_uchar = 0;
pub const LUA_GCRESTART: ::libc::c_uchar = 1;
pub const LUA_GCCOLLECT: ::libc::c_uchar = 2;
pub const LUA_GCCOUNT: ::libc::c_uchar = 3;
pub const LUA_GCCOUNTB: ::libc::c_uchar = 4;
pub const LUA_GCSTEP: ::libc::c_uchar = 5;
pub const LUA_GCSETPAUSE: ::libc::c_uchar = 6;
pub const LUA_GCSETSTEPMUL: ::libc::c_uchar = 7;
pub const LUA_HOOKCALL: ::libc::c_uchar = 0;
pub const LUA_HOOKRET: ::libc::c_uchar = 1;
pub const LUA_HOOKLINE: ::libc::c_uchar = 2;
pub const LUA_HOOKCOUNT: ::libc::c_uchar = 3;
pub const LUA_HOOKTAILRET: ::libc::c_uchar = 4;
pub const LUA_MASKCALL: ::libc::c_uchar = 1;
pub const LUA_MASKRET: ::libc::c_uchar = 2;
pub const LUA_MASKLINE: ::libc::c_uchar = 4;
pub const LUA_MASKCOUNT: ::libc::c_uchar = 8;
pub const LUA_ERRFILE: ::libc::c_uchar = 6;
pub const LUA_NOREF: ::libc::c_char = (-2) as _;
pub const LUA_REFNIL: ::libc::c_char = (-1) as _;
pub type ptrdiff_t = isize;
pub type size_t = usize;
pub type wchar_t = ::libc::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Debug)]
pub struct max_align_t {
    pub __clang_max_align_nonce1: ::libc::c_longlong,
    pub __clang_max_align_nonce2: f64,
}
impl ::std::default::Default for max_align_t {
    fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type va_list = __builtin_va_list;
pub type __gnuc_va_list = __builtin_va_list;
pub enum lua_State { }
pub type lua_CFunction =
    ::std::option::Option<unsafe extern "C" fn(L: *mut lua_State)
                              -> ::libc::c_int>;
pub type lua_Reader =
    ::std::option::Option<unsafe extern "C" fn(L: *mut lua_State,
                                               ud: *mut ::libc::c_void,
                                               sz: *mut size_t)
                              -> *const ::libc::c_char>;
pub type lua_Writer =
    ::std::option::Option<unsafe extern "C" fn(L: *mut lua_State,
                                               p: *const ::libc::c_void,
                                               sz: size_t,
                                               ud: *mut ::libc::c_void)
                              -> ::libc::c_int>;
pub type lua_Alloc =
    ::std::option::Option<unsafe extern "C" fn(ud: *mut ::libc::c_void,
                                               ptr: *mut ::libc::c_void,
                                               osize: size_t, nsize: size_t)
                              -> *mut ::libc::c_void>;
pub type lua_Number = f64;
pub type lua_Integer = ptrdiff_t;
pub type lua_Hook =
    ::std::option::Option<unsafe extern "C" fn(L: *mut lua_State,
                                               ar: *mut lua_Debug)>;
#[repr(C)]
#[derive(Copy)]
pub struct lua_Debug {
    pub event: ::libc::c_int,
    pub name: *const ::libc::c_char,
    pub namewhat: *const ::libc::c_char,
    pub what: *const ::libc::c_char,
    pub source: *const ::libc::c_char,
    pub currentline: ::libc::c_int,
    pub nups: ::libc::c_int,
    pub linedefined: ::libc::c_int,
    pub lastlinedefined: ::libc::c_int,
    pub short_src: [::libc::c_char; 60usize],
    pub i_ci: ::libc::c_int,
}
impl ::std::clone::Clone for lua_Debug {
    fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for lua_Debug {
    fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Debug)]
pub struct luaL_Reg {
    pub name: *const ::libc::c_char,
    pub func: lua_CFunction,
}
impl ::std::default::Default for luaL_Reg {
    fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct luaL_Buffer {
    pub p: *mut ::libc::c_char,
    pub lvl: ::libc::c_int,
    pub L: *mut lua_State,
    pub buffer: [::libc::c_char; 8192usize],
}
impl ::std::clone::Clone for luaL_Buffer {
    fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for luaL_Buffer {
    fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Debug)]
pub struct __va_list_tag {
    pub gp_offset: ::libc::c_uint,
    pub fp_offset: ::libc::c_uint,
    pub overflow_arg_area: *mut ::libc::c_void,
    pub reg_save_area: *mut ::libc::c_void,
}
impl ::std::default::Default for __va_list_tag {
    fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}

extern "C" {
    pub fn lua_newstate(f: lua_Alloc, ud: *mut ::libc::c_void)
     -> *mut lua_State;
    pub fn lua_close(L: *mut lua_State);
    pub fn lua_newthread(L: *mut lua_State) -> *mut lua_State;
    pub fn lua_atpanic(L: *mut lua_State, panicf: lua_CFunction)
     -> lua_CFunction;
    pub fn lua_gettop(L: *mut lua_State) -> ::libc::c_int;
    pub fn lua_settop(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_pushvalue(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_remove(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_insert(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_replace(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_checkstack(L: *mut lua_State, sz: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_xmove(from: *mut lua_State, to: *mut lua_State,
                     n: ::libc::c_int);
    pub fn lua_isnumber(L: *mut lua_State, idx: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_isstring(L: *mut lua_State, idx: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_iscfunction(L: *mut lua_State, idx: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_isuserdata(L: *mut lua_State, idx: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_type(L: *mut lua_State, idx: ::libc::c_int) -> ::libc::c_int;
    pub fn lua_typename(L: *mut lua_State, tp: ::libc::c_int)
     -> *const ::libc::c_char;
    pub fn lua_equal(L: *mut lua_State, idx1: ::libc::c_int,
                     idx2: ::libc::c_int) -> ::libc::c_int;
    pub fn lua_rawequal(L: *mut lua_State, idx1: ::libc::c_int,
                        idx2: ::libc::c_int) -> ::libc::c_int;
    pub fn lua_lessthan(L: *mut lua_State, idx1: ::libc::c_int,
                        idx2: ::libc::c_int) -> ::libc::c_int;
    pub fn lua_tonumber(L: *mut lua_State, idx: ::libc::c_int) -> lua_Number;
    pub fn lua_tointeger(L: *mut lua_State, idx: ::libc::c_int)
     -> lua_Integer;
    pub fn lua_toboolean(L: *mut lua_State, idx: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_tolstring(L: *mut lua_State, idx: ::libc::c_int,
                         len: *mut size_t) -> *const ::libc::c_char;
    pub fn lua_objlen(L: *mut lua_State, idx: ::libc::c_int) -> size_t;
    pub fn lua_tocfunction(L: *mut lua_State, idx: ::libc::c_int)
     -> lua_CFunction;
    pub fn lua_touserdata(L: *mut lua_State, idx: ::libc::c_int)
     -> *mut ::libc::c_void;
    pub fn lua_tothread(L: *mut lua_State, idx: ::libc::c_int)
     -> *mut lua_State;
    pub fn lua_topointer(L: *mut lua_State, idx: ::libc::c_int)
     -> *const ::libc::c_void;
    pub fn lua_pushnil(L: *mut lua_State);
    pub fn lua_pushnumber(L: *mut lua_State, n: lua_Number);
    pub fn lua_pushinteger(L: *mut lua_State, n: lua_Integer);
    pub fn lua_pushlstring(L: *mut lua_State, s: *const ::libc::c_char,
                           l: size_t);
    pub fn lua_pushstring(L: *mut lua_State, s: *const ::libc::c_char);
    pub fn lua_pushvfstring(L: *mut lua_State, fmt: *const ::libc::c_char,
                            argp: va_list) -> *const ::libc::c_char;
    pub fn lua_pushfstring(L: *mut lua_State, fmt: *const ::libc::c_char, ...)
     -> *const ::libc::c_char;
    pub fn lua_pushcclosure(L: *mut lua_State, fn_: lua_CFunction,
                            n: ::libc::c_int);
    pub fn lua_pushboolean(L: *mut lua_State, b: ::libc::c_int);
    pub fn lua_pushlightuserdata(L: *mut lua_State, p: *mut ::libc::c_void);
    pub fn lua_pushthread(L: *mut lua_State) -> ::libc::c_int;
    pub fn lua_gettable(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_getfield(L: *mut lua_State, idx: ::libc::c_int,
                        k: *const ::libc::c_char);
    pub fn lua_rawget(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_rawgeti(L: *mut lua_State, idx: ::libc::c_int,
                       n: ::libc::c_int);
    pub fn lua_createtable(L: *mut lua_State, narr: ::libc::c_int,
                           nrec: ::libc::c_int);
    pub fn lua_newuserdata(L: *mut lua_State, sz: size_t)
     -> *mut ::libc::c_void;
    pub fn lua_getmetatable(L: *mut lua_State, objindex: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_getfenv(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_settable(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_setfield(L: *mut lua_State, idx: ::libc::c_int,
                        k: *const ::libc::c_char);
    pub fn lua_rawset(L: *mut lua_State, idx: ::libc::c_int);
    pub fn lua_rawseti(L: *mut lua_State, idx: ::libc::c_int,
                       n: ::libc::c_int);
    pub fn lua_setmetatable(L: *mut lua_State, objindex: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_setfenv(L: *mut lua_State, idx: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_call(L: *mut lua_State, nargs: ::libc::c_int,
                    nresults: ::libc::c_int);
    pub fn lua_pcall(L: *mut lua_State, nargs: ::libc::c_int,
                     nresults: ::libc::c_int, errfunc: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_cpcall(L: *mut lua_State, func: lua_CFunction,
                      ud: *mut ::libc::c_void) -> ::libc::c_int;
    pub fn lua_load(L: *mut lua_State, reader: lua_Reader,
                    dt: *mut ::libc::c_void, chunkname: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn lua_dump(L: *mut lua_State, writer: lua_Writer,
                    data: *mut ::libc::c_void) -> ::libc::c_int;
    pub fn lua_yield(L: *mut lua_State, nresults: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_resume(L: *mut lua_State, narg: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_status(L: *mut lua_State) -> ::libc::c_int;
    pub fn lua_gc(L: *mut lua_State, what: ::libc::c_int, data: ::libc::c_int)
     -> ::libc::c_int;
    pub fn lua_error(L: *mut lua_State) -> ::libc::c_int;
    pub fn lua_next(L: *mut lua_State, idx: ::libc::c_int) -> ::libc::c_int;
    pub fn lua_concat(L: *mut lua_State, n: ::libc::c_int);
    pub fn lua_getallocf(L: *mut lua_State, ud: *mut *mut ::libc::c_void)
     -> lua_Alloc;
    pub fn lua_setallocf(L: *mut lua_State, f: lua_Alloc,
                         ud: *mut ::libc::c_void);
    pub fn lua_setlevel(from: *mut lua_State, to: *mut lua_State);
    pub fn lua_getstack(L: *mut lua_State, level: ::libc::c_int,
                        ar: *mut lua_Debug) -> ::libc::c_int;
    pub fn lua_getinfo(L: *mut lua_State, what: *const ::libc::c_char,
                       ar: *mut lua_Debug) -> ::libc::c_int;
    pub fn lua_getlocal(L: *mut lua_State, ar: *const lua_Debug,
                        n: ::libc::c_int) -> *const ::libc::c_char;
    pub fn lua_setlocal(L: *mut lua_State, ar: *const lua_Debug,
                        n: ::libc::c_int) -> *const ::libc::c_char;
    pub fn lua_getupvalue(L: *mut lua_State, funcindex: ::libc::c_int,
                          n: ::libc::c_int) -> *const ::libc::c_char;
    pub fn lua_setupvalue(L: *mut lua_State, funcindex: ::libc::c_int,
                          n: ::libc::c_int) -> *const ::libc::c_char;
    pub fn lua_sethook(L: *mut lua_State, func: lua_Hook, mask: ::libc::c_int,
                       count: ::libc::c_int) -> ::libc::c_int;
    pub fn lua_gethook(L: *mut lua_State) -> lua_Hook;
    pub fn lua_gethookmask(L: *mut lua_State) -> ::libc::c_int;
    pub fn lua_gethookcount(L: *mut lua_State) -> ::libc::c_int;
    pub fn lua_upvalueid(L: *mut lua_State, idx: ::libc::c_int,
                         n: ::libc::c_int) -> *mut ::libc::c_void;
    pub fn lua_upvaluejoin(L: *mut lua_State, idx1: ::libc::c_int,
                           n1: ::libc::c_int, idx2: ::libc::c_int,
                           n2: ::libc::c_int);
    pub fn lua_loadx(L: *mut lua_State, reader: lua_Reader,
                     dt: *mut ::libc::c_void,
                     chunkname: *const ::libc::c_char,
                     mode: *const ::libc::c_char) -> ::libc::c_int;
    pub fn luaL_openlib(L: *mut lua_State, libname: *const ::libc::c_char,
                        l: *const luaL_Reg, nup: ::libc::c_int);
    pub fn luaL_register(L: *mut lua_State, libname: *const ::libc::c_char,
                         l: *const luaL_Reg);
    pub fn luaL_getmetafield(L: *mut lua_State, obj: ::libc::c_int,
                             e: *const ::libc::c_char) -> ::libc::c_int;
    pub fn luaL_callmeta(L: *mut lua_State, obj: ::libc::c_int,
                         e: *const ::libc::c_char) -> ::libc::c_int;
    pub fn luaL_typerror(L: *mut lua_State, narg: ::libc::c_int,
                         tname: *const ::libc::c_char) -> ::libc::c_int;
    pub fn luaL_argerror(L: *mut lua_State, numarg: ::libc::c_int,
                         extramsg: *const ::libc::c_char) -> ::libc::c_int;
    pub fn luaL_checklstring(L: *mut lua_State, numArg: ::libc::c_int,
                             l: *mut size_t) -> *const ::libc::c_char;
    pub fn luaL_optlstring(L: *mut lua_State, numArg: ::libc::c_int,
                           def: *const ::libc::c_char, l: *mut size_t)
     -> *const ::libc::c_char;
    pub fn luaL_checknumber(L: *mut lua_State, numArg: ::libc::c_int)
     -> lua_Number;
    pub fn luaL_optnumber(L: *mut lua_State, nArg: ::libc::c_int,
                          def: lua_Number) -> lua_Number;
    pub fn luaL_checkinteger(L: *mut lua_State, numArg: ::libc::c_int)
     -> lua_Integer;
    pub fn luaL_optinteger(L: *mut lua_State, nArg: ::libc::c_int,
                           def: lua_Integer) -> lua_Integer;
    pub fn luaL_checkstack(L: *mut lua_State, sz: ::libc::c_int,
                           msg: *const ::libc::c_char);
    pub fn luaL_checktype(L: *mut lua_State, narg: ::libc::c_int,
                          t: ::libc::c_int);
    pub fn luaL_checkany(L: *mut lua_State, narg: ::libc::c_int);
    pub fn luaL_newmetatable(L: *mut lua_State, tname: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn luaL_checkudata(L: *mut lua_State, ud: ::libc::c_int,
                           tname: *const ::libc::c_char)
     -> *mut ::libc::c_void;
    pub fn luaL_where(L: *mut lua_State, lvl: ::libc::c_int);
    pub fn luaL_error(L: *mut lua_State, fmt: *const ::libc::c_char, ...)
     -> ::libc::c_int;
    pub fn luaL_checkoption(L: *mut lua_State, narg: ::libc::c_int,
                            def: *const ::libc::c_char,
                            lst: *mut *const ::libc::c_char) -> ::libc::c_int;
    pub fn luaL_ref(L: *mut lua_State, t: ::libc::c_int) -> ::libc::c_int;
    pub fn luaL_unref(L: *mut lua_State, t: ::libc::c_int,
                      ref_: ::libc::c_int);
    pub fn luaL_loadfile(L: *mut lua_State, filename: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn luaL_loadbuffer(L: *mut lua_State, buff: *const ::libc::c_char,
                           sz: size_t, name: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn luaL_loadstring(L: *mut lua_State, s: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn luaL_newstate() -> *mut lua_State;
    pub fn luaL_gsub(L: *mut lua_State, s: *const ::libc::c_char,
                     p: *const ::libc::c_char, r: *const ::libc::c_char)
     -> *const ::libc::c_char;
    pub fn luaL_findtable(L: *mut lua_State, idx: ::libc::c_int,
                          fname: *const ::libc::c_char, szhint: ::libc::c_int)
     -> *const ::libc::c_char;
    pub fn luaL_fileresult(L: *mut lua_State, stat: ::libc::c_int,
                           fname: *const ::libc::c_char) -> ::libc::c_int;
    pub fn luaL_execresult(L: *mut lua_State, stat: ::libc::c_int)
     -> ::libc::c_int;
    pub fn luaL_loadfilex(L: *mut lua_State, filename: *const ::libc::c_char,
                          mode: *const ::libc::c_char) -> ::libc::c_int;
    pub fn luaL_loadbufferx(L: *mut lua_State, buff: *const ::libc::c_char,
                            sz: size_t, name: *const ::libc::c_char,
                            mode: *const ::libc::c_char) -> ::libc::c_int;
    pub fn luaL_traceback(L: *mut lua_State, L1: *mut lua_State,
                          msg: *const ::libc::c_char, level: ::libc::c_int);
    pub fn luaL_buffinit(L: *mut lua_State, B: *mut luaL_Buffer);
    pub fn luaL_prepbuffer(B: *mut luaL_Buffer) -> *mut ::libc::c_char;
    pub fn luaL_addlstring(B: *mut luaL_Buffer, s: *const ::libc::c_char,
                           l: size_t);
    pub fn luaL_addstring(B: *mut luaL_Buffer, s: *const ::libc::c_char);
    pub fn luaL_addvalue(B: *mut luaL_Buffer);
    pub fn luaL_pushresult(B: *mut luaL_Buffer);
}