<commit_before>#![allow(non_camel_case_types)]
#![allow(uppercase_variables)]
#![allow(dead_code)]

use libc;
use libc::c_int;
use std::{ default, ptr };

pub static MULTRET: c_int = -1;

pub static LUAI_MAXSTACK: c_int = 1000000;  // or 15000 with 32b        // TODO: 
pub static LUAI_FIRSTPSEUDOIDX: c_int = (-LUAI_MAXSTACK - 1000);
pub static LUA_REGISTRYINDEX: c_int = LUAI_FIRSTPSEUDOIDX;

pub static LUA_OK: c_int = 0;
pub static LUA_YIELD: c_int = 1;
pub static LUA_ERRRUN: c_int = 2;
pub static LUA_ERRSYNTAX: c_int = 3;
pub static LUA_ERRMEM: c_int = 4;
pub static LUA_ERRGCMM: c_int = 5;
pub static LUA_ERRERR: c_int = 6;


pub struct lua_State;

pub type lua_CFunction = extern "C" fn(L: *mut lua_State) -> c_int;

pub type lua_Reader = extern "C" fn(L: *mut lua_State, ud: *mut libc::c_void, sz: *mut libc::size_t) -> *const libc::c_char;
pub type lua_Writer = extern "C" fn(L: *mut lua_State, p: *const libc::c_void, sz: libc::size_t, ud: *mut libc::c_void) -> libc::c_int;

pub type lua_Alloc = extern "C" fn(ud: *mut libc::c_void, ptr: *mut libc::c_void, osize: libc::size_t, nsize: libc::size_t) -> *mut libc::c_void;

pub type lua_Hook = extern "C" fn(L: *mut lua_State, ar: *mut lua_Debug);


pub static LUA_TNONE: c_int = -1;

pub static LUA_TNIL: c_int = 0;
pub static LUA_TBOOLEAN: c_int = 1;
pub static LUA_TLIGHTUSERDATA: c_int = 2;
pub static LUA_TNUMBER: c_int = 3;
pub static LUA_TSTRING: c_int = 4;
pub static LUA_TTABLE: c_int = 5;
pub static LUA_TFUNCTION: c_int = 6;
pub static LUA_TUSERDATA: c_int = 7;
pub static LUA_TTHREAD: c_int = 8;

pub static LUA_MINSTACK: c_int = 20;

pub static LUA_RIDX_MAINTHREAD: c_int = 1;
pub static LUA_RIDX_GLOBALS: c_int = 2;

pub type lua_Number = libc::c_double;
pub type lua_Integer = libc::ptrdiff_t;
pub type lua_Unsigned = libc::c_ulong;

pub static LUA_OPADD: c_int = 0;
pub static LUA_OPSUB: c_int = 1;
pub static LUA_OPMUL: c_int = 2;
pub static LUA_OPDIV: c_int = 3;
pub static LUA_OPMOD: c_int = 4;
pub static LUA_OPPOW: c_int = 5;
pub static LUA_OPUNM: c_int = 6;

pub static LUA_OPEQ: c_int = 0;
pub static LUA_OPLT: c_int = 1;
pub static LUA_OPLE: c_int = 2;

pub static LUA_GCSTOP: c_int = 0;
pub static LUA_GCRESTART: c_int = 1;
pub static LUA_GCCOLLECT: c_int = 2;
pub static LUA_GCCOUNT: c_int = 3;
pub static LUA_GCCOUNTB: c_int = 4;
pub static LUA_GCSTEP: c_int = 5;
pub static LUA_GCSETPAUSE: c_int = 6;
pub static LUA_GCSETSTEPMUL: c_int = 7;
pub static LUA_GCSETMAJORINC: c_int = 8;
pub static LUA_GCISRUNNING: c_int = 9;
pub static LUA_GCGEN: c_int = 10;
pub static LUA_GCINC: c_int = 11;

pub static LUA_HOOKCALL: c_int = 0;
pub static LUA_HOOKRET: c_int = 1;
pub static LUA_HOOKLINE: c_int = 2;
pub static LUA_HOOKCOUNT: c_int = 3;
pub static LUA_HOOKTAILRET: c_int = 4;

pub static LUA_MASKCALL: c_int = 1 << LUA_HOOKCALL as uint;
pub static LUA_MASKRET: c_int = 1 << LUA_HOOKRET as uint;
pub static LUA_MASKLINE: c_int = 1 << LUA_HOOKLINE as uint;
pub static LUA_MASKCOUNT: c_int = 1 << LUA_HOOKCOUNT as uint;

pub struct lua_Debug {
    pub event: 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: c_int,
    pub linedefined: c_int,
    pub lastlinedefined: c_int,
    pub nups: libc::c_uchar,
    pub nparams: libc::c_uchar,
    pub isvararg: libc::c_char,
    pub istailcall: libc::c_char,
    pub short_src: [libc::c_char, ..60]//,
    //i_ci: *CallInfo
}

#[link(name = "lua5.2")]
extern "C" {
    pub fn lua_newstate(f: lua_Alloc, ud: *mut libc::c_void) -> *mut lua_State;<commit_msg>Add #[repr(C)] attributes to squelch warnings<commit_after>#![allow(non_camel_case_types)]
#![allow(uppercase_variables)]
#![allow(dead_code)]

use libc;
use libc::c_int;
use std::{ default, ptr };

pub static MULTRET: c_int = -1;

pub static LUAI_MAXSTACK: c_int = 1000000;  // or 15000 with 32b        // TODO:
pub static LUAI_FIRSTPSEUDOIDX: c_int = (-LUAI_MAXSTACK - 1000);
pub static LUA_REGISTRYINDEX: c_int = LUAI_FIRSTPSEUDOIDX;

pub static LUA_OK: c_int = 0;
pub static LUA_YIELD: c_int = 1;
pub static LUA_ERRRUN: c_int = 2;
pub static LUA_ERRSYNTAX: c_int = 3;
pub static LUA_ERRMEM: c_int = 4;
pub static LUA_ERRGCMM: c_int = 5;
pub static LUA_ERRERR: c_int = 6;


#[repr(C)]
pub struct lua_State;

pub type lua_CFunction = extern "C" fn(L: *mut lua_State) -> c_int;

pub type lua_Reader = extern "C" fn(L: *mut lua_State, ud: *mut libc::c_void, sz: *mut libc::size_t) -> *const libc::c_char;
pub type lua_Writer = extern "C" fn(L: *mut lua_State, p: *const libc::c_void, sz: libc::size_t, ud: *mut libc::c_void) -> libc::c_int;

pub type lua_Alloc = extern "C" fn(ud: *mut libc::c_void, ptr: *mut libc::c_void, osize: libc::size_t, nsize: libc::size_t) -> *mut libc::c_void;

pub type lua_Hook = extern "C" fn(L: *mut lua_State, ar: *mut lua_Debug);


pub static LUA_TNONE: c_int = -1;

pub static LUA_TNIL: c_int = 0;
pub static LUA_TBOOLEAN: c_int = 1;
pub static LUA_TLIGHTUSERDATA: c_int = 2;
pub static LUA_TNUMBER: c_int = 3;
pub static LUA_TSTRING: c_int = 4;
pub static LUA_TTABLE: c_int = 5;
pub static LUA_TFUNCTION: c_int = 6;
pub static LUA_TUSERDATA: c_int = 7;
pub static LUA_TTHREAD: c_int = 8;

pub static LUA_MINSTACK: c_int = 20;

pub static LUA_RIDX_MAINTHREAD: c_int = 1;
pub static LUA_RIDX_GLOBALS: c_int = 2;

pub type lua_Number = libc::c_double;
pub type lua_Integer = libc::ptrdiff_t;
pub type lua_Unsigned = libc::c_ulong;

pub static LUA_OPADD: c_int = 0;
pub static LUA_OPSUB: c_int = 1;
pub static LUA_OPMUL: c_int = 2;
pub static LUA_OPDIV: c_int = 3;
pub static LUA_OPMOD: c_int = 4;
pub static LUA_OPPOW: c_int = 5;
pub static LUA_OPUNM: c_int = 6;

pub static LUA_OPEQ: c_int = 0;
pub static LUA_OPLT: c_int = 1;
pub static LUA_OPLE: c_int = 2;

pub static LUA_GCSTOP: c_int = 0;
pub static LUA_GCRESTART: c_int = 1;
pub static LUA_GCCOLLECT: c_int = 2;
pub static LUA_GCCOUNT: c_int = 3;
pub static LUA_GCCOUNTB: c_int = 4;
pub static LUA_GCSTEP: c_int = 5;
pub static LUA_GCSETPAUSE: c_int = 6;
pub static LUA_GCSETSTEPMUL: c_int = 7;
pub static LUA_GCSETMAJORINC: c_int = 8;
pub static LUA_GCISRUNNING: c_int = 9;
pub static LUA_GCGEN: c_int = 10;
pub static LUA_GCINC: c_int = 11;

pub static LUA_HOOKCALL: c_int = 0;
pub static LUA_HOOKRET: c_int = 1;
pub static LUA_HOOKLINE: c_int = 2;
pub static LUA_HOOKCOUNT: c_int = 3;
pub static LUA_HOOKTAILRET: c_int = 4;

pub static LUA_MASKCALL: c_int = 1 << LUA_HOOKCALL as uint;
pub static LUA_MASKRET: c_int = 1 << LUA_HOOKRET as uint;
pub static LUA_MASKLINE: c_int = 1 << LUA_HOOKLINE as uint;
pub static LUA_MASKCOUNT: c_int = 1 << LUA_HOOKCOUNT as uint;

#[repr(C)]
pub struct lua_Debug {
    pub event: 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: c_int,
    pub linedefined: c_int,
    pub lastlinedefined: c_int,
    pub nups: libc::c_uchar,
    pub nparams: libc::c_uchar,
    pub isvararg: libc::c_char,
    pub istailcall: libc::c_char,
    pub short_src: [libc::c_char, ..60]//,
    //i_ci: *CallInfo
}

#[link(name = "lua5.2")]
extern "C" {
    pub fn lua_newstate(f: lua_Alloc, ud: *mut libc::c_void) -> *mut lua_State;
{'fraction_non_alphanumeric': 0.11517820283473235, 'fraction_numerical': 0.021191688454658044, 'mean_word_length': 4.629744384198296, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2449440', 'n_tokens_mistral': 3342, 'n_tokens_neox': 3087, 'n_words': 908}