1pub const LUA_LDIR: &'static [u8; 7usize] = b"!\\lua\\\0";
6pub const LUA_CDIR: &'static [u8; 3usize] = b"!\\\0";
7pub const LUA_PATH_DEFAULT: &'static [u8; 38usize] =
8 b".\\?.lua;!\\lua\\?.lua;!\\lua\\?\\init.lua;\0";
9pub const LUA_CPATH_DEFAULT: &'static [u8; 30usize] = b".\\?.dll;!\\?.dll;!\\loadall.dll\0";
10pub const LUA_PATH: &'static [u8; 9usize] = b"LUA_PATH\0";
11pub const LUA_CPATH: &'static [u8; 10usize] = b"LUA_CPATH\0";
12pub const LUA_INIT: &'static [u8; 9usize] = b"LUA_INIT\0";
13pub const LUA_DIRSEP: &'static [u8; 2usize] = b"\\\0";
14pub const LUA_PATHSEP: &'static [u8; 2usize] = b";\0";
15pub const LUA_PATH_MARK: &'static [u8; 2usize] = b"?\0";
16pub const LUA_EXECDIR: &'static [u8; 2usize] = b"!\0";
17pub const LUA_IGMARK: &'static [u8; 2usize] = b"-\0";
18pub const LUA_PATH_CONFIG: &'static [u8; 11usize] = b"\\\n;\n?\n!\n-\n\0";
19pub const LUAI_MAXSTACK: u32 = 65500;
20pub const LUAI_MAXCSTACK: u32 = 8000;
21pub const LUAI_GCPAUSE: u32 = 200;
22pub const LUAI_GCMUL: u32 = 200;
23pub const LUA_MAXCAPTURES: u32 = 32;
24pub const LUA_IDSIZE: u32 = 60;
25pub const LUA_NUMBER_SCAN: &'static [u8; 4usize] = b"%lf\0";
26pub const LUA_NUMBER_FMT: &'static [u8; 6usize] = b"%.14g\0";
27pub const LUAI_MAXNUMBER2STR: u32 = 32;
28pub const LUA_INTFRMLEN: &'static [u8; 2usize] = b"l\0";
29pub const LUA_VERSION: &'static [u8; 8usize] = b"Lua 5.1\0";
30pub const LUA_RELEASE: &'static [u8; 10usize] = b"Lua 5.1.4\0";
31pub const LUA_VERSION_NUM: u32 = 501;
32pub const LUA_COPYRIGHT: &'static [u8; 41usize] = b"Copyright (C) 1994-2008 Lua.org, PUC-Rio\0";
33pub const LUA_AUTHORS: &'static [u8; 49usize] =
34 b"R. Ierusalimschy, L. H. de Figueiredo & W. Celes\0";
35pub const LUA_SIGNATURE: &'static [u8; 5usize] = b"\x1BLua\0";
36pub const LUA_MULTRET: i32 = -1;
37pub const LUA_REGISTRYINDEX: i32 = -10000;
38pub const LUA_ENVIRONINDEX: i32 = -10001;
39pub const LUA_GLOBALSINDEX: i32 = -10002;
40pub const LUA_OK: u32 = 0;
41pub const LUA_YIELD: u32 = 1;
42pub const LUA_ERRRUN: u32 = 2;
43pub const LUA_ERRSYNTAX: u32 = 3;
44pub const LUA_ERRMEM: u32 = 4;
45pub const LUA_ERRERR: u32 = 5;
46pub const LUA_TNONE: i32 = -1;
47pub const LUA_TNIL: u32 = 0;
48pub const LUA_TBOOLEAN: u32 = 1;
49pub const LUA_TLIGHTUSERDATA: u32 = 2;
50pub const LUA_TNUMBER: u32 = 3;
51pub const LUA_TSTRING: u32 = 4;
52pub const LUA_TTABLE: u32 = 5;
53pub const LUA_TFUNCTION: u32 = 6;
54pub const LUA_TUSERDATA: u32 = 7;
55pub const LUA_TTHREAD: u32 = 8;
56pub const LUA_MINSTACK: u32 = 20;
57pub const LUA_GCSTOP: u32 = 0;
58pub const LUA_GCRESTART: u32 = 1;
59pub const LUA_GCCOLLECT: u32 = 2;
60pub const LUA_GCCOUNT: u32 = 3;
61pub const LUA_GCCOUNTB: u32 = 4;
62pub const LUA_GCSTEP: u32 = 5;
63pub const LUA_GCSETPAUSE: u32 = 6;
64pub const LUA_GCSETSTEPMUL: u32 = 7;
65pub const LUA_GCISRUNNING: u32 = 9;
66pub const LUA_HOOKCALL: u32 = 0;
67pub const LUA_HOOKRET: u32 = 1;
68pub const LUA_HOOKLINE: u32 = 2;
69pub const LUA_HOOKCOUNT: u32 = 3;
70pub const LUA_HOOKTAILRET: u32 = 4;
71pub const LUA_MASKCALL: u32 = 1;
72pub const LUA_MASKRET: u32 = 2;
73pub const LUA_MASKLINE: u32 = 4;
74pub const LUA_MASKCOUNT: u32 = 8;
75pub const LUA_FILEHANDLE: &'static [u8; 6usize] = b"FILE*\0";
76pub const LUA_COLIBNAME: &'static [u8; 10usize] = b"coroutine\0";
77pub const LUA_MATHLIBNAME: &'static [u8; 5usize] = b"math\0";
78pub const LUA_STRLIBNAME: &'static [u8; 7usize] = b"string\0";
79pub const LUA_TABLIBNAME: &'static [u8; 6usize] = b"table\0";
80pub const LUA_IOLIBNAME: &'static [u8; 3usize] = b"io\0";
81pub const LUA_OSLIBNAME: &'static [u8; 3usize] = b"os\0";
82pub const LUA_LOADLIBNAME: &'static [u8; 8usize] = b"package\0";
83pub const LUA_DBLIBNAME: &'static [u8; 6usize] = b"debug\0";
84pub const LUA_BITLIBNAME: &'static [u8; 4usize] = b"bit\0";
85pub const LUA_JITLIBNAME: &'static [u8; 4usize] = b"jit\0";
86pub const LUA_FFILIBNAME: &'static [u8; 4usize] = b"ffi\0";
87pub const LUA_ERRFILE: u32 = 6;
88pub const LUA_NOREF: i32 = -2;
89pub const LUA_REFNIL: i32 = -1;
90pub const LUAJIT_VERSION: &'static [u8; 19usize] = b"LuaJIT 2.1.0-beta3\0";
91pub const LUAJIT_VERSION_NUM: u32 = 20100;
92pub const LUAJIT_COPYRIGHT: &'static [u8; 34usize] = b"Copyright (C) 2005-2017 Mike Pall\0";
93pub const LUAJIT_URL: &'static [u8; 19usize] = b"http://luajit.org/\0";
94pub const LUAJIT_MODE_MASK: u32 = 255;
95pub const LUAJIT_MODE_OFF: u32 = 0;
96pub const LUAJIT_MODE_ON: u32 = 256;
97pub const LUAJIT_MODE_FLUSH: u32 = 512;
98pub type va_list = __builtin_va_list;
99#[repr(C)]
100#[derive(Debug, Copy, Clone)]
101pub struct lua_State {
103 _unused: [u8; 0],
104}
105pub type lua_CFunction =
107 ::core::option::Option<unsafe extern "C" fn(L: *mut lua_State) -> libc::c_int>;
108pub type lua_Reader = ::core::option::Option<
110 unsafe extern "C" fn(
111 L: *mut lua_State,
112 ud: *mut libc::c_void,
113 sz: *mut usize,
114 ) -> *const libc::c_char,
115>;
116pub type lua_Writer = ::core::option::Option<
118 unsafe extern "C" fn(
119 L: *mut lua_State,
120 p: *const libc::c_void,
121 sz: usize,
122 ud: *mut libc::c_void,
123 ) -> libc::c_int,
124>;
125pub type lua_Alloc = ::core::option::Option<
127 unsafe extern "C" fn(
128 ud: *mut libc::c_void,
129 ptr: *mut libc::c_void,
130 osize: usize,
131 nsize: usize,
132 ) -> *mut libc::c_void,
133>;
134pub type lua_Number = f64;
136pub type lua_Integer = isize;
138extern "C" {
139 pub fn lua_newstate(f: lua_Alloc, ud: *mut libc::c_void) -> *mut lua_State;
141}
142extern "C" {
143 pub fn lua_close(L: *mut lua_State);
145}
146extern "C" {
147 pub fn lua_newthread(L: *mut lua_State) -> *mut lua_State;
149}
150extern "C" {
151 pub fn lua_atpanic(L: *mut lua_State, panicf: lua_CFunction) -> lua_CFunction;
153}
154extern "C" {
155 pub fn lua_gettop(L: *mut lua_State) -> libc::c_int;
157}
158extern "C" {
159 pub fn lua_settop(L: *mut lua_State, idx: libc::c_int);
161}
162extern "C" {
163 pub fn lua_pushvalue(L: *mut lua_State, idx: libc::c_int);
165}
166extern "C" {
167 pub fn lua_remove(L: *mut lua_State, idx: libc::c_int);
169}
170extern "C" {
171 pub fn lua_insert(L: *mut lua_State, idx: libc::c_int);
173}
174extern "C" {
175 pub fn lua_replace(L: *mut lua_State, idx: libc::c_int);
177}
178extern "C" {
179 pub fn lua_checkstack(L: *mut lua_State, sz: libc::c_int) -> libc::c_int;
181}
182extern "C" {
183 pub fn lua_xmove(from: *mut lua_State, to: *mut lua_State, n: libc::c_int);
185}
186extern "C" {
187 pub fn lua_isnumber(L: *mut lua_State, idx: libc::c_int) -> libc::c_int;
189}
190extern "C" {
191 pub fn lua_isstring(L: *mut lua_State, idx: libc::c_int) -> libc::c_int;
193}
194extern "C" {
195 pub fn lua_iscfunction(L: *mut lua_State, idx: libc::c_int) -> libc::c_int;
197}
198extern "C" {
199 pub fn lua_isuserdata(L: *mut lua_State, idx: libc::c_int) -> libc::c_int;
201}
202extern "C" {
203 pub fn lua_type(L: *mut lua_State, idx: libc::c_int) -> libc::c_int;
205}
206extern "C" {
207 pub fn lua_typename(L: *mut lua_State, tp: libc::c_int) -> *const libc::c_char;
209}
210extern "C" {
211 pub fn lua_equal(L: *mut lua_State, idx1: libc::c_int, idx2: libc::c_int) -> libc::c_int;
213}
214extern "C" {
215 pub fn lua_rawequal(L: *mut lua_State, idx1: libc::c_int, idx2: libc::c_int) -> libc::c_int;
217}
218extern "C" {
219 pub fn lua_lessthan(L: *mut lua_State, idx1: libc::c_int, idx2: libc::c_int) -> libc::c_int;
221}
222extern "C" {
223 pub fn lua_tonumber(L: *mut lua_State, idx: libc::c_int) -> lua_Number;
225}
226extern "C" {
227 pub fn lua_tointeger(L: *mut lua_State, idx: libc::c_int) -> lua_Integer;
229}
230extern "C" {
231 pub fn lua_toboolean(L: *mut lua_State, idx: libc::c_int) -> libc::c_int;
233}
234extern "C" {
235 pub fn lua_tolstring(
237 L: *mut lua_State,
238 idx: libc::c_int,
239 len: *mut usize,
240 ) -> *const libc::c_char;
241}
242extern "C" {
243 pub fn lua_objlen(L: *mut lua_State, idx: libc::c_int) -> usize;
245}
246extern "C" {
247 pub fn lua_tocfunction(L: *mut lua_State, idx: libc::c_int) -> lua_CFunction;
249}
250extern "C" {
251 pub fn lua_touserdata(L: *mut lua_State, idx: libc::c_int) -> *mut libc::c_void;
253}
254extern "C" {
255 pub fn lua_tothread(L: *mut lua_State, idx: libc::c_int) -> *mut lua_State;
257}
258extern "C" {
259 pub fn lua_topointer(L: *mut lua_State, idx: libc::c_int) -> *const libc::c_void;
261}
262extern "C" {
263 pub fn lua_pushnil(L: *mut lua_State);
265}
266extern "C" {
267 pub fn lua_pushnumber(L: *mut lua_State, n: lua_Number);
269}
270extern "C" {
271 pub fn lua_pushinteger(L: *mut lua_State, n: lua_Integer);
273}
274extern "C" {
275 pub fn lua_pushlstring(L: *mut lua_State, s: *const libc::c_char, l: usize);
277}
278extern "C" {
279 pub fn lua_pushstring(L: *mut lua_State, s: *const libc::c_char);
281}
282extern "C" {
283 pub fn lua_pushvfstring(
285 L: *mut lua_State,
286 fmt: *const libc::c_char,
287 argp: va_list,
288 ) -> *const libc::c_char;
289}
290extern "C" {
291 pub fn lua_pushfstring(L: *mut lua_State, fmt: *const libc::c_char, ...)
293 -> *const libc::c_char;
294}
295extern "C" {
296 pub fn lua_pushcclosure(L: *mut lua_State, fn_: lua_CFunction, n: libc::c_int);
298}
299extern "C" {
300 pub fn lua_pushboolean(L: *mut lua_State, b: libc::c_int);
302}
303extern "C" {
304 pub fn lua_pushlightuserdata(L: *mut lua_State, p: *mut libc::c_void);
306}
307extern "C" {
308 pub fn lua_pushthread(L: *mut lua_State) -> libc::c_int;
310}
311extern "C" {
312 pub fn lua_gettable(L: *mut lua_State, idx: libc::c_int);
314}
315extern "C" {
316 pub fn lua_getfield(L: *mut lua_State, idx: libc::c_int, k: *const libc::c_char);
318}
319extern "C" {
320 pub fn lua_rawget(L: *mut lua_State, idx: libc::c_int);
322}
323extern "C" {
324 pub fn lua_rawgeti(L: *mut lua_State, idx: libc::c_int, n: libc::c_int);
326}
327extern "C" {
328 pub fn lua_createtable(L: *mut lua_State, narr: libc::c_int, nrec: libc::c_int);
330}
331extern "C" {
332 pub fn lua_newuserdata(L: *mut lua_State, sz: usize) -> *mut libc::c_void;
334}
335extern "C" {
336 pub fn lua_getmetatable(L: *mut lua_State, objindex: libc::c_int) -> libc::c_int;
338}
339extern "C" {
340 pub fn lua_getfenv(L: *mut lua_State, idx: libc::c_int);
342}
343extern "C" {
344 pub fn lua_settable(L: *mut lua_State, idx: libc::c_int);
346}
347extern "C" {
348 pub fn lua_setfield(L: *mut lua_State, idx: libc::c_int, k: *const libc::c_char);
350}
351extern "C" {
352 pub fn lua_rawset(L: *mut lua_State, idx: libc::c_int);
354}
355extern "C" {
356 pub fn lua_rawseti(L: *mut lua_State, idx: libc::c_int, n: libc::c_int);
358}
359extern "C" {
360 pub fn lua_setmetatable(L: *mut lua_State, objindex: libc::c_int) -> libc::c_int;
362}
363extern "C" {
364 pub fn lua_setfenv(L: *mut lua_State, idx: libc::c_int) -> libc::c_int;
366}
367extern "C" {
368 pub fn lua_call(L: *mut lua_State, nargs: libc::c_int, nresults: libc::c_int);
370}
371extern "C" {
372 pub fn lua_pcall(
374 L: *mut lua_State,
375 nargs: libc::c_int,
376 nresults: libc::c_int,
377 errfunc: libc::c_int,
378 ) -> libc::c_int;
379}
380extern "C" {
381 pub fn lua_cpcall(L: *mut lua_State, func: lua_CFunction, ud: *mut libc::c_void)
383 -> libc::c_int;
384}
385extern "C" {
386 pub fn lua_load(
388 L: *mut lua_State,
389 reader: lua_Reader,
390 dt: *mut libc::c_void,
391 chunkname: *const libc::c_char,
392 ) -> libc::c_int;
393}
394extern "C" {
395 pub fn lua_dump(L: *mut lua_State, writer: lua_Writer, data: *mut libc::c_void) -> libc::c_int;
397}
398extern "C" {
399 pub fn lua_yield(L: *mut lua_State, nresults: libc::c_int) -> libc::c_int;
401}
402extern "C" {
403 pub fn lua_resume(L: *mut lua_State, narg: libc::c_int) -> libc::c_int;
405}
406extern "C" {
407 pub fn lua_status(L: *mut lua_State) -> libc::c_int;
409}
410extern "C" {
411 pub fn lua_gc(L: *mut lua_State, what: libc::c_int, data: libc::c_int) -> libc::c_int;
413}
414extern "C" {
415 pub fn lua_error(L: *mut lua_State) -> libc::c_int;
417}
418extern "C" {
419 pub fn lua_next(L: *mut lua_State, idx: libc::c_int) -> libc::c_int;
421}
422extern "C" {
423 pub fn lua_concat(L: *mut lua_State, n: libc::c_int);
425}
426extern "C" {
427 pub fn lua_getallocf(L: *mut lua_State, ud: *mut *mut libc::c_void) -> lua_Alloc;
429}
430extern "C" {
431 pub fn lua_setallocf(L: *mut lua_State, f: lua_Alloc, ud: *mut libc::c_void);
433}
434extern "C" {
435 pub fn lua_setlevel(from: *mut lua_State, to: *mut lua_State);
437}
438pub type lua_Hook =
440 ::core::option::Option<unsafe extern "C" fn(L: *mut lua_State, ar: *mut lua_Debug)>;
441extern "C" {
442 pub fn lua_getstack(L: *mut lua_State, level: libc::c_int, ar: *mut lua_Debug) -> libc::c_int;
444}
445extern "C" {
446 pub fn lua_getinfo(
448 L: *mut lua_State,
449 what: *const libc::c_char,
450 ar: *mut lua_Debug,
451 ) -> libc::c_int;
452}
453extern "C" {
454 pub fn lua_getlocal(
456 L: *mut lua_State,
457 ar: *const lua_Debug,
458 n: libc::c_int,
459 ) -> *const libc::c_char;
460}
461extern "C" {
462 pub fn lua_setlocal(
464 L: *mut lua_State,
465 ar: *const lua_Debug,
466 n: libc::c_int,
467 ) -> *const libc::c_char;
468}
469extern "C" {
470 pub fn lua_getupvalue(
472 L: *mut lua_State,
473 funcindex: libc::c_int,
474 n: libc::c_int,
475 ) -> *const libc::c_char;
476}
477extern "C" {
478 pub fn lua_setupvalue(
480 L: *mut lua_State,
481 funcindex: libc::c_int,
482 n: libc::c_int,
483 ) -> *const libc::c_char;
484}
485extern "C" {
486 pub fn lua_sethook(
488 L: *mut lua_State,
489 func: lua_Hook,
490 mask: libc::c_int,
491 count: libc::c_int,
492 ) -> libc::c_int;
493}
494extern "C" {
495 pub fn lua_gethook(L: *mut lua_State) -> lua_Hook;
497}
498extern "C" {
499 pub fn lua_gethookmask(L: *mut lua_State) -> libc::c_int;
501}
502extern "C" {
503 pub fn lua_gethookcount(L: *mut lua_State) -> libc::c_int;
505}
506extern "C" {
507 pub fn lua_upvalueid(L: *mut lua_State, idx: libc::c_int, n: libc::c_int) -> *mut libc::c_void;
509}
510extern "C" {
511 pub fn lua_upvaluejoin(
513 L: *mut lua_State,
514 idx1: libc::c_int,
515 n1: libc::c_int,
516 idx2: libc::c_int,
517 n2: libc::c_int,
518 );
519}
520extern "C" {
521 pub fn lua_loadx(
523 L: *mut lua_State,
524 reader: lua_Reader,
525 dt: *mut libc::c_void,
526 chunkname: *const libc::c_char,
527 mode: *const libc::c_char,
528 ) -> libc::c_int;
529}
530extern "C" {
531 pub fn lua_version(L: *mut lua_State) -> *const lua_Number;
533}
534extern "C" {
535 pub fn lua_copy(L: *mut lua_State, fromidx: libc::c_int, toidx: libc::c_int);
537}
538extern "C" {
539 pub fn lua_tonumberx(
541 L: *mut lua_State,
542 idx: libc::c_int,
543 isnum: *mut libc::c_int,
544 ) -> lua_Number;
545}
546extern "C" {
547 pub fn lua_tointegerx(
549 L: *mut lua_State,
550 idx: libc::c_int,
551 isnum: *mut libc::c_int,
552 ) -> lua_Integer;
553}
554extern "C" {
555 pub fn lua_isyieldable(L: *mut lua_State) -> libc::c_int;
557}
558#[repr(C)]
559#[derive(Copy, Clone)]
560pub struct lua_Debug {
562 pub event: libc::c_int,
563 pub name: *const libc::c_char,
564 pub namewhat: *const libc::c_char,
565 pub what: *const libc::c_char,
566 pub source: *const libc::c_char,
567 pub currentline: libc::c_int,
568 pub nups: libc::c_int,
569 pub linedefined: libc::c_int,
570 pub lastlinedefined: libc::c_int,
571 pub short_src: [libc::c_char; 60usize],
572 pub i_ci: libc::c_int,
573}
574#[test]
575fn bindgen_test_layout_lua_Debug() {
576 assert_eq!(
577 ::core::mem::size_of::<lua_Debug>(),
578 120usize,
579 concat!("Size of: ", stringify!(lua_Debug))
580 );
581 assert_eq!(
582 ::core::mem::align_of::<lua_Debug>(),
583 8usize,
584 concat!("Alignment of ", stringify!(lua_Debug))
585 );
586 assert_eq!(
587 unsafe { &(*(::core::ptr::null::<lua_Debug>())).event as *const _ as usize },
588 0usize,
589 concat!(
590 "Offset of field: ",
591 stringify!(lua_Debug),
592 "::",
593 stringify!(event)
594 )
595 );
596 assert_eq!(
597 unsafe { &(*(::core::ptr::null::<lua_Debug>())).name as *const _ as usize },
598 8usize,
599 concat!(
600 "Offset of field: ",
601 stringify!(lua_Debug),
602 "::",
603 stringify!(name)
604 )
605 );
606 assert_eq!(
607 unsafe { &(*(::core::ptr::null::<lua_Debug>())).namewhat as *const _ as usize },
608 16usize,
609 concat!(
610 "Offset of field: ",
611 stringify!(lua_Debug),
612 "::",
613 stringify!(namewhat)
614 )
615 );
616 assert_eq!(
617 unsafe { &(*(::core::ptr::null::<lua_Debug>())).what as *const _ as usize },
618 24usize,
619 concat!(
620 "Offset of field: ",
621 stringify!(lua_Debug),
622 "::",
623 stringify!(what)
624 )
625 );
626 assert_eq!(
627 unsafe { &(*(::core::ptr::null::<lua_Debug>())).source as *const _ as usize },
628 32usize,
629 concat!(
630 "Offset of field: ",
631 stringify!(lua_Debug),
632 "::",
633 stringify!(source)
634 )
635 );
636 assert_eq!(
637 unsafe { &(*(::core::ptr::null::<lua_Debug>())).currentline as *const _ as usize },
638 40usize,
639 concat!(
640 "Offset of field: ",
641 stringify!(lua_Debug),
642 "::",
643 stringify!(currentline)
644 )
645 );
646 assert_eq!(
647 unsafe { &(*(::core::ptr::null::<lua_Debug>())).nups as *const _ as usize },
648 44usize,
649 concat!(
650 "Offset of field: ",
651 stringify!(lua_Debug),
652 "::",
653 stringify!(nups)
654 )
655 );
656 assert_eq!(
657 unsafe { &(*(::core::ptr::null::<lua_Debug>())).linedefined as *const _ as usize },
658 48usize,
659 concat!(
660 "Offset of field: ",
661 stringify!(lua_Debug),
662 "::",
663 stringify!(linedefined)
664 )
665 );
666 assert_eq!(
667 unsafe { &(*(::core::ptr::null::<lua_Debug>())).lastlinedefined as *const _ as usize },
668 52usize,
669 concat!(
670 "Offset of field: ",
671 stringify!(lua_Debug),
672 "::",
673 stringify!(lastlinedefined)
674 )
675 );
676 assert_eq!(
677 unsafe { &(*(::core::ptr::null::<lua_Debug>())).short_src as *const _ as usize },
678 56usize,
679 concat!(
680 "Offset of field: ",
681 stringify!(lua_Debug),
682 "::",
683 stringify!(short_src)
684 )
685 );
686 assert_eq!(
687 unsafe { &(*(::core::ptr::null::<lua_Debug>())).i_ci as *const _ as usize },
688 116usize,
689 concat!(
690 "Offset of field: ",
691 stringify!(lua_Debug),
692 "::",
693 stringify!(i_ci)
694 )
695 );
696}
697impl ::core::fmt::Debug for lua_Debug {
698 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
699 write ! ( f , "lua_Debug {{ event: {:?}, name: {:?}, namewhat: {:?}, what: {:?}, source: {:?}, currentline: {:?}, nups: {:?}, linedefined: {:?}, lastlinedefined: {:?}, short_src: [...], i_ci: {:?} }}" , self . event , self . name , self . namewhat , self . what , self . source , self . currentline , self . nups , self . linedefined , self . lastlinedefined , self . i_ci )
700 }
701}
702extern "C" {
703 pub fn luaL_openlibs(L: *mut lua_State);
705}
706#[repr(C)]
707#[derive(Debug, Copy, Clone)]
708pub struct luaL_Reg {
710 pub name: *const libc::c_char,
711 pub func: lua_CFunction,
712}
713#[test]
714fn bindgen_test_layout_luaL_Reg() {
715 assert_eq!(
716 ::core::mem::size_of::<luaL_Reg>(),
717 16usize,
718 concat!("Size of: ", stringify!(luaL_Reg))
719 );
720 assert_eq!(
721 ::core::mem::align_of::<luaL_Reg>(),
722 8usize,
723 concat!("Alignment of ", stringify!(luaL_Reg))
724 );
725 assert_eq!(
726 unsafe { &(*(::core::ptr::null::<luaL_Reg>())).name as *const _ as usize },
727 0usize,
728 concat!(
729 "Offset of field: ",
730 stringify!(luaL_Reg),
731 "::",
732 stringify!(name)
733 )
734 );
735 assert_eq!(
736 unsafe { &(*(::core::ptr::null::<luaL_Reg>())).func as *const _ as usize },
737 8usize,
738 concat!(
739 "Offset of field: ",
740 stringify!(luaL_Reg),
741 "::",
742 stringify!(func)
743 )
744 );
745}
746extern "C" {
747 pub fn luaL_openlib(
749 L: *mut lua_State,
750 libname: *const libc::c_char,
751 l: *const luaL_Reg,
752 nup: libc::c_int,
753 );
754}
755extern "C" {
756 pub fn luaL_register(L: *mut lua_State, libname: *const libc::c_char, l: *const luaL_Reg);
758}
759extern "C" {
760 pub fn luaL_getmetafield(
762 L: *mut lua_State,
763 obj: libc::c_int,
764 e: *const libc::c_char,
765 ) -> libc::c_int;
766}
767extern "C" {
768 pub fn luaL_callmeta(
770 L: *mut lua_State,
771 obj: libc::c_int,
772 e: *const libc::c_char,
773 ) -> libc::c_int;
774}
775extern "C" {
776 pub fn luaL_typerror(
778 L: *mut lua_State,
779 narg: libc::c_int,
780 tname: *const libc::c_char,
781 ) -> libc::c_int;
782}
783extern "C" {
784 pub fn luaL_argerror(
786 L: *mut lua_State,
787 numarg: libc::c_int,
788 extramsg: *const libc::c_char,
789 ) -> libc::c_int;
790}
791extern "C" {
792 pub fn luaL_checklstring(
794 L: *mut lua_State,
795 numArg: libc::c_int,
796 l: *mut usize,
797 ) -> *const libc::c_char;
798}
799extern "C" {
800 pub fn luaL_optlstring(
802 L: *mut lua_State,
803 numArg: libc::c_int,
804 def: *const libc::c_char,
805 l: *mut usize,
806 ) -> *const libc::c_char;
807}
808extern "C" {
809 pub fn luaL_checknumber(L: *mut lua_State, numArg: libc::c_int) -> lua_Number;
811}
812extern "C" {
813 pub fn luaL_optnumber(L: *mut lua_State, nArg: libc::c_int, def: lua_Number) -> lua_Number;
815}
816extern "C" {
817 pub fn luaL_checkinteger(L: *mut lua_State, numArg: libc::c_int) -> lua_Integer;
819}
820extern "C" {
821 pub fn luaL_optinteger(L: *mut lua_State, nArg: libc::c_int, def: lua_Integer) -> lua_Integer;
823}
824extern "C" {
825 pub fn luaL_checkstack(L: *mut lua_State, sz: libc::c_int, msg: *const libc::c_char);
827}
828extern "C" {
829 pub fn luaL_checktype(L: *mut lua_State, narg: libc::c_int, t: libc::c_int);
831}
832extern "C" {
833 pub fn luaL_checkany(L: *mut lua_State, narg: libc::c_int);
835}
836extern "C" {
837 pub fn luaL_newmetatable(L: *mut lua_State, tname: *const libc::c_char) -> libc::c_int;
839}
840extern "C" {
841 pub fn luaL_checkudata(
843 L: *mut lua_State,
844 ud: libc::c_int,
845 tname: *const libc::c_char,
846 ) -> *mut libc::c_void;
847}
848extern "C" {
849 pub fn luaL_where(L: *mut lua_State, lvl: libc::c_int);
851}
852extern "C" {
853 pub fn luaL_error(L: *mut lua_State, fmt: *const libc::c_char, ...) -> libc::c_int;
855}
856extern "C" {
857 pub fn luaL_checkoption(
859 L: *mut lua_State,
860 narg: libc::c_int,
861 def: *const libc::c_char,
862 lst: *const *const libc::c_char,
863 ) -> libc::c_int;
864}
865extern "C" {
866 pub fn luaL_ref(L: *mut lua_State, t: libc::c_int) -> libc::c_int;
868}
869extern "C" {
870 pub fn luaL_unref(L: *mut lua_State, t: libc::c_int, ref_: libc::c_int);
872}
873extern "C" {
874 pub fn luaL_loadfile(L: *mut lua_State, filename: *const libc::c_char) -> libc::c_int;
876}
877extern "C" {
878 pub fn luaL_loadbuffer(
880 L: *mut lua_State,
881 buff: *const libc::c_char,
882 sz: usize,
883 name: *const libc::c_char,
884 ) -> libc::c_int;
885}
886extern "C" {
887 pub fn luaL_loadstring(L: *mut lua_State, s: *const libc::c_char) -> libc::c_int;
889}
890extern "C" {
891 pub fn luaL_newstate() -> *mut lua_State;
893}
894extern "C" {
895 pub fn luaL_gsub(
897 L: *mut lua_State,
898 s: *const libc::c_char,
899 p: *const libc::c_char,
900 r: *const libc::c_char,
901 ) -> *const libc::c_char;
902}
903extern "C" {
904 pub fn luaL_findtable(
906 L: *mut lua_State,
907 idx: libc::c_int,
908 fname: *const libc::c_char,
909 szhint: libc::c_int,
910 ) -> *const libc::c_char;
911}
912extern "C" {
913 pub fn luaL_fileresult(
915 L: *mut lua_State,
916 stat: libc::c_int,
917 fname: *const libc::c_char,
918 ) -> libc::c_int;
919}
920extern "C" {
921 pub fn luaL_execresult(L: *mut lua_State, stat: libc::c_int) -> libc::c_int;
923}
924extern "C" {
925 pub fn luaL_loadfilex(
927 L: *mut lua_State,
928 filename: *const libc::c_char,
929 mode: *const libc::c_char,
930 ) -> libc::c_int;
931}
932extern "C" {
933 pub fn luaL_loadbufferx(
935 L: *mut lua_State,
936 buff: *const libc::c_char,
937 sz: usize,
938 name: *const libc::c_char,
939 mode: *const libc::c_char,
940 ) -> libc::c_int;
941}
942extern "C" {
943 pub fn luaL_traceback(
945 L: *mut lua_State,
946 L1: *mut lua_State,
947 msg: *const libc::c_char,
948 level: libc::c_int,
949 );
950}
951extern "C" {
952 pub fn luaL_setfuncs(L: *mut lua_State, l: *const luaL_Reg, nup: libc::c_int);
954}
955extern "C" {
956 pub fn luaL_pushmodule(L: *mut lua_State, modname: *const libc::c_char, sizehint: libc::c_int);
958}
959extern "C" {
960 pub fn luaL_testudata(
962 L: *mut lua_State,
963 ud: libc::c_int,
964 tname: *const libc::c_char,
965 ) -> *mut libc::c_void;
966}
967extern "C" {
968 pub fn luaL_setmetatable(L: *mut lua_State, tname: *const libc::c_char);
970}
971#[repr(C)]
972#[derive(Copy, Clone)]
973pub struct luaL_Buffer {
975 pub p: *mut libc::c_char,
976 pub lvl: libc::c_int,
977 pub L: *mut lua_State,
978 pub buffer: [libc::c_char; 512usize],
979}
980#[test]
981fn bindgen_test_layout_luaL_Buffer() {
982 assert_eq!(
983 ::core::mem::size_of::<luaL_Buffer>(),
984 536usize,
985 concat!("Size of: ", stringify!(luaL_Buffer))
986 );
987 assert_eq!(
988 ::core::mem::align_of::<luaL_Buffer>(),
989 8usize,
990 concat!("Alignment of ", stringify!(luaL_Buffer))
991 );
992 assert_eq!(
993 unsafe { &(*(::core::ptr::null::<luaL_Buffer>())).p as *const _ as usize },
994 0usize,
995 concat!(
996 "Offset of field: ",
997 stringify!(luaL_Buffer),
998 "::",
999 stringify!(p)
1000 )
1001 );
1002 assert_eq!(
1003 unsafe { &(*(::core::ptr::null::<luaL_Buffer>())).lvl as *const _ as usize },
1004 8usize,
1005 concat!(
1006 "Offset of field: ",
1007 stringify!(luaL_Buffer),
1008 "::",
1009 stringify!(lvl)
1010 )
1011 );
1012 assert_eq!(
1013 unsafe { &(*(::core::ptr::null::<luaL_Buffer>())).L as *const _ as usize },
1014 16usize,
1015 concat!(
1016 "Offset of field: ",
1017 stringify!(luaL_Buffer),
1018 "::",
1019 stringify!(L)
1020 )
1021 );
1022 assert_eq!(
1023 unsafe { &(*(::core::ptr::null::<luaL_Buffer>())).buffer as *const _ as usize },
1024 24usize,
1025 concat!(
1026 "Offset of field: ",
1027 stringify!(luaL_Buffer),
1028 "::",
1029 stringify!(buffer)
1030 )
1031 );
1032}
1033impl ::core::fmt::Debug for luaL_Buffer {
1034 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1035 write!(
1036 f,
1037 "luaL_Buffer {{ p: {:?}, lvl: {:?}, L: {:?}, buffer: [...] }}",
1038 self.p, self.lvl, self.L
1039 )
1040 }
1041}
1042extern "C" {
1043 pub fn luaL_buffinit(L: *mut lua_State, B: *mut luaL_Buffer);
1045}
1046extern "C" {
1047 pub fn luaL_prepbuffer(B: *mut luaL_Buffer) -> *mut libc::c_char;
1049}
1050extern "C" {
1051 pub fn luaL_addlstring(B: *mut luaL_Buffer, s: *const libc::c_char, l: usize);
1053}
1054extern "C" {
1055 pub fn luaL_addstring(B: *mut luaL_Buffer, s: *const libc::c_char);
1057}
1058extern "C" {
1059 pub fn luaL_addvalue(B: *mut luaL_Buffer);
1061}
1062extern "C" {
1063 pub fn luaL_pushresult(B: *mut luaL_Buffer);
1065}
1066pub const LUAJIT_MODE_ENGINE: _bindgen_ty_1 = 0;
1067pub const LUAJIT_MODE_DEBUG: _bindgen_ty_1 = 1;
1068pub const LUAJIT_MODE_FUNC: _bindgen_ty_1 = 2;
1069pub const LUAJIT_MODE_ALLFUNC: _bindgen_ty_1 = 3;
1070pub const LUAJIT_MODE_ALLSUBFUNC: _bindgen_ty_1 = 4;
1071pub const LUAJIT_MODE_TRACE: _bindgen_ty_1 = 5;
1072pub const LUAJIT_MODE_WRAPCFUNC: _bindgen_ty_1 = 16;
1073pub const LUAJIT_MODE_MAX: _bindgen_ty_1 = 17;
1074pub type _bindgen_ty_1 = i32;
1075extern "C" {
1076 pub fn luaJIT_setmode(L: *mut lua_State, idx: libc::c_int, mode: libc::c_int) -> libc::c_int;
1078}
1079pub type luaJIT_profile_callback = ::core::option::Option<
1080 unsafe extern "C" fn(
1081 data: *mut libc::c_void,
1082 L: *mut lua_State,
1083 samples: libc::c_int,
1084 vmstate: libc::c_int,
1085 ),
1086>;
1087extern "C" {
1088 pub fn luaJIT_profile_start(
1090 L: *mut lua_State,
1091 mode: *const libc::c_char,
1092 cb: luaJIT_profile_callback,
1093 data: *mut libc::c_void,
1094 );
1095}
1096extern "C" {
1097 pub fn luaJIT_profile_stop(L: *mut lua_State);
1099}
1100extern "C" {
1101 pub fn luaJIT_profile_dumpstack(
1103 L: *mut lua_State,
1104 fmt: *const libc::c_char,
1105 depth: libc::c_int,
1106 len: *mut usize,
1107 ) -> *const libc::c_char;
1108}
1109extern "C" {
1110 pub fn luaJIT_version_2_1_0_beta3();
1112}
1113pub type __builtin_va_list = *mut libc::c_char;