#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
fn extract_bit(byte: u8, index: usize) -> bool {
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
Self::extract_bit(byte, index)
}
#[inline]
pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = unsafe {
*(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
};
Self::extract_bit(byte, index)
}
#[inline]
fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
byte | mask
} else {
byte & !mask
}
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
*byte = Self::change_bit(*byte, index, val);
}
#[inline]
pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = unsafe {
(core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
};
unsafe { *byte = Self::change_bit(*byte, index, val) };
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
let mut val = 0;
for i in 0..(bit_width as usize) {
if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
#[inline]
pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
}
}
}
pub const _STDIO_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __TIMESIZE: u32 = 64;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const __GLIBC_USE_C2X_STRTOL: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_60559_BFP__: u32 = 201404;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 38;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _____fpos_t_defined: u32 = 1;
pub const ____mbstate_t_defined: u32 = 1;
pub const _____fpos64_t_defined: u32 = 1;
pub const ____FILE_defined: u32 = 1;
pub const __FILE_defined: u32 = 1;
pub const __struct_FILE_defined: u32 = 1;
pub const _IO_EOF_SEEN: u32 = 16;
pub const _IO_ERR_SEEN: u32 = 32;
pub const _IO_USER_LOCK: u32 = 32768;
pub const __cookie_io_functions_t_defined: u32 = 1;
pub const _IOFBF: u32 = 0;
pub const _IOLBF: u32 = 1;
pub const _IONBF: u32 = 2;
pub const BUFSIZ: u32 = 8192;
pub const EOF: i32 = -1;
pub const SEEK_SET: u32 = 0;
pub const SEEK_CUR: u32 = 1;
pub const SEEK_END: u32 = 2;
pub const P_tmpdir: &[u8; 5] = b"/tmp\0";
pub const L_tmpnam: u32 = 20;
pub const TMP_MAX: u32 = 238328;
pub const _BITS_STDIO_LIM_H: u32 = 1;
pub const FILENAME_MAX: u32 = 4096;
pub const L_ctermid: u32 = 9;
pub const FOPEN_MAX: u32 = 16;
pub const __HAVE_FLOAT128: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
pub const __HAVE_FLOAT64X: u32 = 1;
pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
pub const __HAVE_FLOAT16: u32 = 0;
pub const __HAVE_FLOAT32: u32 = 1;
pub const __HAVE_FLOAT64: u32 = 1;
pub const __HAVE_FLOAT32X: u32 = 1;
pub const __HAVE_FLOAT128X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
pub const _STDINT_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const _STRING_H: u32 = 1;
pub const _BITS_TYPES_LOCALE_T_H: u32 = 1;
pub const _BITS_TYPES___LOCALE_T_H: u32 = 1;
pub const _STRINGS_H: u32 = 1;
pub const JS_LIMB_BITS: u32 = 64;
pub const JS_SHORT_BIG_INT_BITS: u32 = 64;
pub const JS_PROP_CONFIGURABLE: u32 = 1;
pub const JS_PROP_WRITABLE: u32 = 2;
pub const JS_PROP_ENUMERABLE: u32 = 4;
pub const JS_PROP_C_W_E: u32 = 7;
pub const JS_PROP_LENGTH: u32 = 8;
pub const JS_PROP_TMASK: u32 = 48;
pub const JS_PROP_NORMAL: u32 = 0;
pub const JS_PROP_GETSET: u32 = 16;
pub const JS_PROP_VARREF: u32 = 32;
pub const JS_PROP_AUTOINIT: u32 = 48;
pub const JS_PROP_HAS_SHIFT: u32 = 8;
pub const JS_PROP_HAS_CONFIGURABLE: u32 = 256;
pub const JS_PROP_HAS_WRITABLE: u32 = 512;
pub const JS_PROP_HAS_ENUMERABLE: u32 = 1024;
pub const JS_PROP_HAS_GET: u32 = 2048;
pub const JS_PROP_HAS_SET: u32 = 4096;
pub const JS_PROP_HAS_VALUE: u32 = 8192;
pub const JS_PROP_THROW: u32 = 16384;
pub const JS_PROP_THROW_STRICT: u32 = 32768;
pub const JS_PROP_NO_ADD: u32 = 65536;
pub const JS_PROP_NO_EXOTIC: u32 = 131072;
pub const JS_DEFAULT_STACK_SIZE: u32 = 1048576;
pub const JS_EVAL_TYPE_GLOBAL: u32 = 0;
pub const JS_EVAL_TYPE_MODULE: u32 = 1;
pub const JS_EVAL_TYPE_DIRECT: u32 = 2;
pub const JS_EVAL_TYPE_INDIRECT: u32 = 3;
pub const JS_EVAL_TYPE_MASK: u32 = 3;
pub const JS_EVAL_FLAG_STRICT: u32 = 8;
pub const JS_EVAL_FLAG_COMPILE_ONLY: u32 = 32;
pub const JS_EVAL_FLAG_BACKTRACE_BARRIER: u32 = 64;
pub const JS_EVAL_FLAG_ASYNC: u32 = 128;
pub const JS_ATOM_NULL: u32 = 0;
pub const JS_CALL_FLAG_CONSTRUCTOR: u32 = 1;
pub const JS_INVALID_CLASS_ID: u32 = 0;
pub const JS_GPN_STRING_MASK: u32 = 1;
pub const JS_GPN_SYMBOL_MASK: u32 = 2;
pub const JS_GPN_PRIVATE_MASK: u32 = 4;
pub const JS_GPN_ENUM_ONLY: u32 = 16;
pub const JS_GPN_SET_ENUM: u32 = 32;
pub const JS_PARSE_JSON_EXT: u32 = 1;
pub const JS_STRIP_SOURCE: u32 = 1;
pub const JS_STRIP_DEBUG: u32 = 2;
pub const JS_WRITE_OBJ_BYTECODE: u32 = 1;
pub const JS_WRITE_OBJ_BSWAP: u32 = 2;
pub const JS_WRITE_OBJ_SAB: u32 = 4;
pub const JS_WRITE_OBJ_REFERENCE: u32 = 8;
pub const JS_READ_OBJ_BYTECODE: u32 = 1;
pub const JS_READ_OBJ_ROM_DATA: u32 = 2;
pub const JS_READ_OBJ_SAB: u32 = 4;
pub const JS_READ_OBJ_REFERENCE: u32 = 8;
pub const JS_DEF_CFUNC: u32 = 0;
pub const JS_DEF_CGETSET: u32 = 1;
pub const JS_DEF_CGETSET_MAGIC: u32 = 2;
pub const JS_DEF_PROP_STRING: u32 = 3;
pub const JS_DEF_PROP_INT32: u32 = 4;
pub const JS_DEF_PROP_INT64: u32 = 5;
pub const JS_DEF_PROP_DOUBLE: u32 = 6;
pub const JS_DEF_PROP_UNDEFINED: u32 = 7;
pub const JS_DEF_OBJECT: u32 = 8;
pub const JS_DEF_ALIAS: u32 = 9;
pub type __gnuc_va_list = __builtin_va_list;
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_long;
pub type __u_quad_t = ::std::os::raw::c_ulong;
pub type __intmax_t = ::std::os::raw::c_long;
pub type __uintmax_t = ::std::os::raw::c_ulong;
pub type __dev_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
pub __val: [::std::os::raw::c_int; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __fsid_t"][::std::mem::size_of::<__fsid_t>() - 8usize];
["Alignment of __fsid_t"][::std::mem::align_of::<__fsid_t>() - 4usize];
["Offset of field: __fsid_t::__val"][::std::mem::offset_of!(__fsid_t, __val) - 0usize];
};
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = ::std::os::raw::c_ulong;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __suseconds64_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = ::std::os::raw::c_long;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
pub type __fsword_t = ::std::os::raw::c_long;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __mbstate_t {
pub __count: ::std::os::raw::c_int,
pub __value: __mbstate_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __mbstate_t__bindgen_ty_1 {
pub __wch: ::std::os::raw::c_uint,
pub __wchb: [::std::os::raw::c_char; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __mbstate_t__bindgen_ty_1"]
[::std::mem::size_of::<__mbstate_t__bindgen_ty_1>() - 4usize];
["Alignment of __mbstate_t__bindgen_ty_1"]
[::std::mem::align_of::<__mbstate_t__bindgen_ty_1>() - 4usize];
["Offset of field: __mbstate_t__bindgen_ty_1::__wch"]
[::std::mem::offset_of!(__mbstate_t__bindgen_ty_1, __wch) - 0usize];
["Offset of field: __mbstate_t__bindgen_ty_1::__wchb"]
[::std::mem::offset_of!(__mbstate_t__bindgen_ty_1, __wchb) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __mbstate_t"][::std::mem::size_of::<__mbstate_t>() - 8usize];
["Alignment of __mbstate_t"][::std::mem::align_of::<__mbstate_t>() - 4usize];
["Offset of field: __mbstate_t::__count"]
[::std::mem::offset_of!(__mbstate_t, __count) - 0usize];
["Offset of field: __mbstate_t::__value"]
[::std::mem::offset_of!(__mbstate_t, __value) - 4usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _G_fpos_t {
pub __pos: __off_t,
pub __state: __mbstate_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _G_fpos_t"][::std::mem::size_of::<_G_fpos_t>() - 16usize];
["Alignment of _G_fpos_t"][::std::mem::align_of::<_G_fpos_t>() - 8usize];
["Offset of field: _G_fpos_t::__pos"][::std::mem::offset_of!(_G_fpos_t, __pos) - 0usize];
["Offset of field: _G_fpos_t::__state"][::std::mem::offset_of!(_G_fpos_t, __state) - 8usize];
};
pub type __fpos_t = _G_fpos_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _G_fpos64_t {
pub __pos: __off64_t,
pub __state: __mbstate_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _G_fpos64_t"][::std::mem::size_of::<_G_fpos64_t>() - 16usize];
["Alignment of _G_fpos64_t"][::std::mem::align_of::<_G_fpos64_t>() - 8usize];
["Offset of field: _G_fpos64_t::__pos"][::std::mem::offset_of!(_G_fpos64_t, __pos) - 0usize];
["Offset of field: _G_fpos64_t::__state"]
[::std::mem::offset_of!(_G_fpos64_t, __state) - 8usize];
};
pub type __fpos64_t = _G_fpos64_t;
pub type __FILE = _IO_FILE;
pub type FILE = _IO_FILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_marker {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_codecvt {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_wide_data {
_unused: [u8; 0],
}
pub type _IO_lock_t = ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_FILE {
pub _flags: ::std::os::raw::c_int,
pub _IO_read_ptr: *mut ::std::os::raw::c_char,
pub _IO_read_end: *mut ::std::os::raw::c_char,
pub _IO_read_base: *mut ::std::os::raw::c_char,
pub _IO_write_base: *mut ::std::os::raw::c_char,
pub _IO_write_ptr: *mut ::std::os::raw::c_char,
pub _IO_write_end: *mut ::std::os::raw::c_char,
pub _IO_buf_base: *mut ::std::os::raw::c_char,
pub _IO_buf_end: *mut ::std::os::raw::c_char,
pub _IO_save_base: *mut ::std::os::raw::c_char,
pub _IO_backup_base: *mut ::std::os::raw::c_char,
pub _IO_save_end: *mut ::std::os::raw::c_char,
pub _markers: *mut _IO_marker,
pub _chain: *mut _IO_FILE,
pub _fileno: ::std::os::raw::c_int,
pub _flags2: ::std::os::raw::c_int,
pub _old_offset: __off_t,
pub _cur_column: ::std::os::raw::c_ushort,
pub _vtable_offset: ::std::os::raw::c_schar,
pub _shortbuf: [::std::os::raw::c_char; 1usize],
pub _lock: *mut _IO_lock_t,
pub _offset: __off64_t,
pub _codecvt: *mut _IO_codecvt,
pub _wide_data: *mut _IO_wide_data,
pub _freeres_list: *mut _IO_FILE,
pub _freeres_buf: *mut ::std::os::raw::c_void,
pub __pad5: usize,
pub _mode: ::std::os::raw::c_int,
pub _unused2: [::std::os::raw::c_char; 20usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _IO_FILE"][::std::mem::size_of::<_IO_FILE>() - 216usize];
["Alignment of _IO_FILE"][::std::mem::align_of::<_IO_FILE>() - 8usize];
["Offset of field: _IO_FILE::_flags"][::std::mem::offset_of!(_IO_FILE, _flags) - 0usize];
["Offset of field: _IO_FILE::_IO_read_ptr"]
[::std::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize];
["Offset of field: _IO_FILE::_IO_read_end"]
[::std::mem::offset_of!(_IO_FILE, _IO_read_end) - 16usize];
["Offset of field: _IO_FILE::_IO_read_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_read_base) - 24usize];
["Offset of field: _IO_FILE::_IO_write_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_write_base) - 32usize];
["Offset of field: _IO_FILE::_IO_write_ptr"]
[::std::mem::offset_of!(_IO_FILE, _IO_write_ptr) - 40usize];
["Offset of field: _IO_FILE::_IO_write_end"]
[::std::mem::offset_of!(_IO_FILE, _IO_write_end) - 48usize];
["Offset of field: _IO_FILE::_IO_buf_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_buf_base) - 56usize];
["Offset of field: _IO_FILE::_IO_buf_end"]
[::std::mem::offset_of!(_IO_FILE, _IO_buf_end) - 64usize];
["Offset of field: _IO_FILE::_IO_save_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_save_base) - 72usize];
["Offset of field: _IO_FILE::_IO_backup_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_backup_base) - 80usize];
["Offset of field: _IO_FILE::_IO_save_end"]
[::std::mem::offset_of!(_IO_FILE, _IO_save_end) - 88usize];
["Offset of field: _IO_FILE::_markers"][::std::mem::offset_of!(_IO_FILE, _markers) - 96usize];
["Offset of field: _IO_FILE::_chain"][::std::mem::offset_of!(_IO_FILE, _chain) - 104usize];
["Offset of field: _IO_FILE::_fileno"][::std::mem::offset_of!(_IO_FILE, _fileno) - 112usize];
["Offset of field: _IO_FILE::_flags2"][::std::mem::offset_of!(_IO_FILE, _flags2) - 116usize];
["Offset of field: _IO_FILE::_old_offset"]
[::std::mem::offset_of!(_IO_FILE, _old_offset) - 120usize];
["Offset of field: _IO_FILE::_cur_column"]
[::std::mem::offset_of!(_IO_FILE, _cur_column) - 128usize];
["Offset of field: _IO_FILE::_vtable_offset"]
[::std::mem::offset_of!(_IO_FILE, _vtable_offset) - 130usize];
["Offset of field: _IO_FILE::_shortbuf"]
[::std::mem::offset_of!(_IO_FILE, _shortbuf) - 131usize];
["Offset of field: _IO_FILE::_lock"][::std::mem::offset_of!(_IO_FILE, _lock) - 136usize];
["Offset of field: _IO_FILE::_offset"][::std::mem::offset_of!(_IO_FILE, _offset) - 144usize];
["Offset of field: _IO_FILE::_codecvt"][::std::mem::offset_of!(_IO_FILE, _codecvt) - 152usize];
["Offset of field: _IO_FILE::_wide_data"]
[::std::mem::offset_of!(_IO_FILE, _wide_data) - 160usize];
["Offset of field: _IO_FILE::_freeres_list"]
[::std::mem::offset_of!(_IO_FILE, _freeres_list) - 168usize];
["Offset of field: _IO_FILE::_freeres_buf"]
[::std::mem::offset_of!(_IO_FILE, _freeres_buf) - 176usize];
["Offset of field: _IO_FILE::__pad5"][::std::mem::offset_of!(_IO_FILE, __pad5) - 184usize];
["Offset of field: _IO_FILE::_mode"][::std::mem::offset_of!(_IO_FILE, _mode) - 192usize];
["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 196usize];
};
pub type cookie_read_function_t = ::std::option::Option<
unsafe extern "C" fn(
__cookie: *mut ::std::os::raw::c_void,
__buf: *mut ::std::os::raw::c_char,
__nbytes: usize,
) -> __ssize_t,
>;
pub type cookie_write_function_t = ::std::option::Option<
unsafe extern "C" fn(
__cookie: *mut ::std::os::raw::c_void,
__buf: *const ::std::os::raw::c_char,
__nbytes: usize,
) -> __ssize_t,
>;
pub type cookie_seek_function_t = ::std::option::Option<
unsafe extern "C" fn(
__cookie: *mut ::std::os::raw::c_void,
__pos: *mut __off64_t,
__w: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
pub type cookie_close_function_t = ::std::option::Option<
unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_cookie_io_functions_t {
pub read: cookie_read_function_t,
pub write: cookie_write_function_t,
pub seek: cookie_seek_function_t,
pub close: cookie_close_function_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _IO_cookie_io_functions_t"]
[::std::mem::size_of::<_IO_cookie_io_functions_t>() - 32usize];
["Alignment of _IO_cookie_io_functions_t"]
[::std::mem::align_of::<_IO_cookie_io_functions_t>() - 8usize];
["Offset of field: _IO_cookie_io_functions_t::read"]
[::std::mem::offset_of!(_IO_cookie_io_functions_t, read) - 0usize];
["Offset of field: _IO_cookie_io_functions_t::write"]
[::std::mem::offset_of!(_IO_cookie_io_functions_t, write) - 8usize];
["Offset of field: _IO_cookie_io_functions_t::seek"]
[::std::mem::offset_of!(_IO_cookie_io_functions_t, seek) - 16usize];
["Offset of field: _IO_cookie_io_functions_t::close"]
[::std::mem::offset_of!(_IO_cookie_io_functions_t, close) - 24usize];
};
pub type cookie_io_functions_t = _IO_cookie_io_functions_t;
pub type va_list = __gnuc_va_list;
pub type off_t = __off_t;
pub type fpos_t = __fpos_t;
unsafe extern "C" {
pub static mut stdin: *mut FILE;
}
unsafe extern "C" {
pub static mut stdout: *mut FILE;
}
unsafe extern "C" {
pub static mut stderr: *mut FILE;
}
unsafe extern "C" {
pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn rename(
__old: *const ::std::os::raw::c_char,
__new: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn renameat(
__oldfd: ::std::os::raw::c_int,
__old: *const ::std::os::raw::c_char,
__newfd: ::std::os::raw::c_int,
__new: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn tmpfile() -> *mut FILE;
}
unsafe extern "C" {
pub fn tmpnam(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn tempnam(
__dir: *const ::std::os::raw::c_char,
__pfx: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fopen(
__filename: *const ::std::os::raw::c_char,
__modes: *const ::std::os::raw::c_char,
) -> *mut FILE;
}
unsafe extern "C" {
pub fn freopen(
__filename: *const ::std::os::raw::c_char,
__modes: *const ::std::os::raw::c_char,
__stream: *mut FILE,
) -> *mut FILE;
}
unsafe extern "C" {
pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char)
-> *mut FILE;
}
unsafe extern "C" {
pub fn fopencookie(
__magic_cookie: *mut ::std::os::raw::c_void,
__modes: *const ::std::os::raw::c_char,
__io_funcs: cookie_io_functions_t,
) -> *mut FILE;
}
unsafe extern "C" {
pub fn fmemopen(
__s: *mut ::std::os::raw::c_void,
__len: usize,
__modes: *const ::std::os::raw::c_char,
) -> *mut FILE;
}
unsafe extern "C" {
pub fn open_memstream(
__bufloc: *mut *mut ::std::os::raw::c_char,
__sizeloc: *mut usize,
) -> *mut FILE;
}
unsafe extern "C" {
pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char);
}
unsafe extern "C" {
pub fn setvbuf(
__stream: *mut FILE,
__buf: *mut ::std::os::raw::c_char,
__modes: ::std::os::raw::c_int,
__n: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: usize);
}
unsafe extern "C" {
pub fn setlinebuf(__stream: *mut FILE);
}
unsafe extern "C" {
pub fn fprintf(
__stream: *mut FILE,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn sprintf(
__s: *mut ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn vfprintf(
__s: *mut FILE,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn vprintf(
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn vsprintf(
__s: *mut ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn snprintf(
__s: *mut ::std::os::raw::c_char,
__maxlen: ::std::os::raw::c_ulong,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn vsnprintf(
__s: *mut ::std::os::raw::c_char,
__maxlen: ::std::os::raw::c_ulong,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn vasprintf(
__ptr: *mut *mut ::std::os::raw::c_char,
__f: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn __asprintf(
__ptr: *mut *mut ::std::os::raw::c_char,
__fmt: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn asprintf(
__ptr: *mut *mut ::std::os::raw::c_char,
__fmt: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn vdprintf(
__fd: ::std::os::raw::c_int,
__fmt: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn dprintf(
__fd: ::std::os::raw::c_int,
__fmt: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fscanf(
__stream: *mut FILE,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn sscanf(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
pub type _Float32 = f32;
pub type _Float64 = f64;
pub type _Float32x = f64;
pub type _Float64x = u128;
unsafe extern "C" {
#[link_name = "\u{1}__isoc99_fscanf"]
pub fn fscanf1(
__stream: *mut FILE,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
#[link_name = "\u{1}__isoc99_scanf"]
pub fn scanf1(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
#[link_name = "\u{1}__isoc99_sscanf"]
pub fn sscanf1(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn vfscanf(
__s: *mut FILE,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn vscanf(
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn vsscanf(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
#[link_name = "\u{1}__isoc99_vfscanf"]
pub fn vfscanf1(
__s: *mut FILE,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
#[link_name = "\u{1}__isoc99_vscanf"]
pub fn vscanf1(
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
#[link_name = "\u{1}__isoc99_vsscanf"]
pub fn vsscanf1(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn getchar() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn getchar_unlocked() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE)
-> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fgets(
__s: *mut ::std::os::raw::c_char,
__n: ::std::os::raw::c_int,
__stream: *mut FILE,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn __getdelim(
__lineptr: *mut *mut ::std::os::raw::c_char,
__n: *mut usize,
__delimiter: ::std::os::raw::c_int,
__stream: *mut FILE,
) -> __ssize_t;
}
unsafe extern "C" {
pub fn getdelim(
__lineptr: *mut *mut ::std::os::raw::c_char,
__n: *mut usize,
__delimiter: ::std::os::raw::c_int,
__stream: *mut FILE,
) -> __ssize_t;
}
unsafe extern "C" {
pub fn getline(
__lineptr: *mut *mut ::std::os::raw::c_char,
__n: *mut usize,
__stream: *mut FILE,
) -> __ssize_t;
}
unsafe extern "C" {
pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fread(
__ptr: *mut ::std::os::raw::c_void,
__size: ::std::os::raw::c_ulong,
__n: ::std::os::raw::c_ulong,
__stream: *mut FILE,
) -> ::std::os::raw::c_ulong;
}
unsafe extern "C" {
pub fn fwrite(
__ptr: *const ::std::os::raw::c_void,
__size: ::std::os::raw::c_ulong,
__n: ::std::os::raw::c_ulong,
__s: *mut FILE,
) -> ::std::os::raw::c_ulong;
}
unsafe extern "C" {
pub fn fread_unlocked(
__ptr: *mut ::std::os::raw::c_void,
__size: usize,
__n: usize,
__stream: *mut FILE,
) -> usize;
}
unsafe extern "C" {
pub fn fwrite_unlocked(
__ptr: *const ::std::os::raw::c_void,
__size: usize,
__n: usize,
__stream: *mut FILE,
) -> usize;
}
unsafe extern "C" {
pub fn fseek(
__stream: *mut FILE,
__off: ::std::os::raw::c_long,
__whence: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long;
}
unsafe extern "C" {
pub fn rewind(__stream: *mut FILE);
}
unsafe extern "C" {
pub fn fseeko(
__stream: *mut FILE,
__off: __off_t,
__whence: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn ftello(__stream: *mut FILE) -> __off_t;
}
unsafe extern "C" {
pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn clearerr(__stream: *mut FILE);
}
unsafe extern "C" {
pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn clearerr_unlocked(__stream: *mut FILE);
}
unsafe extern "C" {
pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn perror(__s: *const ::std::os::raw::c_char);
}
unsafe extern "C" {
pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn popen(
__command: *const ::std::os::raw::c_char,
__modes: *const ::std::os::raw::c_char,
) -> *mut FILE;
}
unsafe extern "C" {
pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn flockfile(__stream: *mut FILE);
}
unsafe extern "C" {
pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn funlockfile(__stream: *mut FILE);
}
unsafe extern "C" {
pub fn __uflow(arg1: *mut FILE) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn __overflow(arg1: *mut FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
unsafe extern "C" {
pub fn memcpy(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn memmove(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn memccpy(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__c: ::std::os::raw::c_int,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn memset(
__s: *mut ::std::os::raw::c_void,
__c: ::std::os::raw::c_int,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn memcmp(
__s1: *const ::std::os::raw::c_void,
__s2: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn __memcmpeq(
__s1: *const ::std::os::raw::c_void,
__s2: *const ::std::os::raw::c_void,
__n: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn memchr(
__s: *const ::std::os::raw::c_void,
__c: ::std::os::raw::c_int,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn strcpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strncpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strcat(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strncat(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strcmp(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn strncmp(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn strcoll(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn strxfrm(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_ulong;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_struct {
pub __locales: [*mut __locale_data; 13usize],
pub __ctype_b: *const ::std::os::raw::c_ushort,
pub __ctype_tolower: *const ::std::os::raw::c_int,
pub __ctype_toupper: *const ::std::os::raw::c_int,
pub __names: [*const ::std::os::raw::c_char; 13usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __locale_struct"][::std::mem::size_of::<__locale_struct>() - 232usize];
["Alignment of __locale_struct"][::std::mem::align_of::<__locale_struct>() - 8usize];
["Offset of field: __locale_struct::__locales"]
[::std::mem::offset_of!(__locale_struct, __locales) - 0usize];
["Offset of field: __locale_struct::__ctype_b"]
[::std::mem::offset_of!(__locale_struct, __ctype_b) - 104usize];
["Offset of field: __locale_struct::__ctype_tolower"]
[::std::mem::offset_of!(__locale_struct, __ctype_tolower) - 112usize];
["Offset of field: __locale_struct::__ctype_toupper"]
[::std::mem::offset_of!(__locale_struct, __ctype_toupper) - 120usize];
["Offset of field: __locale_struct::__names"]
[::std::mem::offset_of!(__locale_struct, __names) - 128usize];
};
pub type __locale_t = *mut __locale_struct;
pub type locale_t = __locale_t;
unsafe extern "C" {
pub fn strcoll_l(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__l: locale_t,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn strxfrm_l(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: usize,
__l: locale_t,
) -> usize;
}
unsafe extern "C" {
pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strndup(
__string: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strchr(
__s: *const ::std::os::raw::c_char,
__c: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strrchr(
__s: *const ::std::os::raw::c_char,
__c: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strchrnul(
__s: *const ::std::os::raw::c_char,
__c: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strcspn(
__s: *const ::std::os::raw::c_char,
__reject: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_ulong;
}
unsafe extern "C" {
pub fn strspn(
__s: *const ::std::os::raw::c_char,
__accept: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_ulong;
}
unsafe extern "C" {
pub fn strpbrk(
__s: *const ::std::os::raw::c_char,
__accept: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strstr(
__haystack: *const ::std::os::raw::c_char,
__needle: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strtok(
__s: *mut ::std::os::raw::c_char,
__delim: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn __strtok_r(
__s: *mut ::std::os::raw::c_char,
__delim: *const ::std::os::raw::c_char,
__save_ptr: *mut *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strtok_r(
__s: *mut ::std::os::raw::c_char,
__delim: *const ::std::os::raw::c_char,
__save_ptr: *mut *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strcasestr(
__haystack: *const ::std::os::raw::c_char,
__needle: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn memmem(
__haystack: *const ::std::os::raw::c_void,
__haystacklen: usize,
__needle: *const ::std::os::raw::c_void,
__needlelen: usize,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn __mempcpy(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__n: usize,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn mempcpy(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong;
}
unsafe extern "C" {
pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: usize) -> usize;
}
unsafe extern "C" {
pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
#[link_name = "\u{1}__xpg_strerror_r"]
pub fn strerror_r(
__errnum: ::std::os::raw::c_int,
__buf: *mut ::std::os::raw::c_char,
__buflen: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn strerror_l(
__errnum: ::std::os::raw::c_int,
__l: locale_t,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn bcmp(
__s1: *const ::std::os::raw::c_void,
__s2: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn bcopy(
__src: *const ::std::os::raw::c_void,
__dest: *mut ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
);
}
unsafe extern "C" {
pub fn bzero(__s: *mut ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong);
}
unsafe extern "C" {
pub fn index(
__s: *const ::std::os::raw::c_char,
__c: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn rindex(
__s: *const ::std::os::raw::c_char,
__c: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn ffs(__i: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn ffsl(__l: ::std::os::raw::c_long) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn ffsll(__ll: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn strcasecmp(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn strncasecmp(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn strcasecmp_l(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__loc: locale_t,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn strncasecmp_l(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__n: usize,
__loc: locale_t,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn explicit_bzero(__s: *mut ::std::os::raw::c_void, __n: usize);
}
unsafe extern "C" {
pub fn strsep(
__stringp: *mut *mut ::std::os::raw::c_char,
__delim: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn __stpcpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn stpcpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn __stpncpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: usize,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn stpncpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn strlcpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_ulong;
}
unsafe extern "C" {
pub fn strlcat(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_ulong;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSRuntime {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSContext {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSClass {
_unused: [u8; 0],
}
pub type JSClassID = u32;
pub type JSAtom = u32;
pub const JS_TAG_FIRST: _bindgen_ty_1 = -9;
pub const JS_TAG_BIG_INT: _bindgen_ty_1 = -9;
pub const JS_TAG_SYMBOL: _bindgen_ty_1 = -8;
pub const JS_TAG_STRING: _bindgen_ty_1 = -7;
pub const JS_TAG_STRING_ROPE: _bindgen_ty_1 = -6;
pub const JS_TAG_MODULE: _bindgen_ty_1 = -3;
pub const JS_TAG_FUNCTION_BYTECODE: _bindgen_ty_1 = -2;
pub const JS_TAG_OBJECT: _bindgen_ty_1 = -1;
pub const JS_TAG_INT: _bindgen_ty_1 = 0;
pub const JS_TAG_BOOL: _bindgen_ty_1 = 1;
pub const JS_TAG_NULL: _bindgen_ty_1 = 2;
pub const JS_TAG_UNDEFINED: _bindgen_ty_1 = 3;
pub const JS_TAG_UNINITIALIZED: _bindgen_ty_1 = 4;
pub const JS_TAG_CATCH_OFFSET: _bindgen_ty_1 = 5;
pub const JS_TAG_EXCEPTION: _bindgen_ty_1 = 6;
pub const JS_TAG_SHORT_BIG_INT: _bindgen_ty_1 = 7;
pub const JS_TAG_FLOAT64: _bindgen_ty_1 = 8;
pub type _bindgen_ty_1 = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSRefCountHeader {
pub ref_count: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSRefCountHeader"][::std::mem::size_of::<JSRefCountHeader>() - 4usize];
["Alignment of JSRefCountHeader"][::std::mem::align_of::<JSRefCountHeader>() - 4usize];
["Offset of field: JSRefCountHeader::ref_count"]
[::std::mem::offset_of!(JSRefCountHeader, ref_count) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union JSValueUnion {
pub int32: i32,
pub float64: f64,
pub ptr: *mut ::std::os::raw::c_void,
pub short_big_int: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSValueUnion"][::std::mem::size_of::<JSValueUnion>() - 8usize];
["Alignment of JSValueUnion"][::std::mem::align_of::<JSValueUnion>() - 8usize];
["Offset of field: JSValueUnion::int32"][::std::mem::offset_of!(JSValueUnion, int32) - 0usize];
["Offset of field: JSValueUnion::float64"]
[::std::mem::offset_of!(JSValueUnion, float64) - 0usize];
["Offset of field: JSValueUnion::ptr"][::std::mem::offset_of!(JSValueUnion, ptr) - 0usize];
["Offset of field: JSValueUnion::short_big_int"]
[::std::mem::offset_of!(JSValueUnion, short_big_int) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSValue {
pub u: JSValueUnion,
pub tag: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSValue"][::std::mem::size_of::<JSValue>() - 16usize];
["Alignment of JSValue"][::std::mem::align_of::<JSValue>() - 8usize];
["Offset of field: JSValue::u"][::std::mem::offset_of!(JSValue, u) - 0usize];
["Offset of field: JSValue::tag"][::std::mem::offset_of!(JSValue, tag) - 8usize];
};
pub type JSCFunction = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
this_val: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
) -> JSValue,
>;
pub type JSCFunctionMagic = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
this_val: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
magic: ::std::os::raw::c_int,
) -> JSValue,
>;
pub type JSCFunctionData = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
this_val: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
magic: ::std::os::raw::c_int,
func_data: *mut JSValue,
) -> JSValue,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSMallocState {
pub malloc_count: usize,
pub malloc_size: usize,
pub malloc_limit: usize,
pub opaque: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSMallocState"][::std::mem::size_of::<JSMallocState>() - 32usize];
["Alignment of JSMallocState"][::std::mem::align_of::<JSMallocState>() - 8usize];
["Offset of field: JSMallocState::malloc_count"]
[::std::mem::offset_of!(JSMallocState, malloc_count) - 0usize];
["Offset of field: JSMallocState::malloc_size"]
[::std::mem::offset_of!(JSMallocState, malloc_size) - 8usize];
["Offset of field: JSMallocState::malloc_limit"]
[::std::mem::offset_of!(JSMallocState, malloc_limit) - 16usize];
["Offset of field: JSMallocState::opaque"]
[::std::mem::offset_of!(JSMallocState, opaque) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSMallocFunctions {
pub js_malloc: ::std::option::Option<
unsafe extern "C" fn(s: *mut JSMallocState, size: usize) -> *mut ::std::os::raw::c_void,
>,
pub js_free: ::std::option::Option<
unsafe extern "C" fn(s: *mut JSMallocState, ptr: *mut ::std::os::raw::c_void),
>,
pub js_realloc: ::std::option::Option<
unsafe extern "C" fn(
s: *mut JSMallocState,
ptr: *mut ::std::os::raw::c_void,
size: usize,
) -> *mut ::std::os::raw::c_void,
>,
pub js_malloc_usable_size:
::std::option::Option<unsafe extern "C" fn(ptr: *const ::std::os::raw::c_void) -> usize>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSMallocFunctions"][::std::mem::size_of::<JSMallocFunctions>() - 32usize];
["Alignment of JSMallocFunctions"][::std::mem::align_of::<JSMallocFunctions>() - 8usize];
["Offset of field: JSMallocFunctions::js_malloc"]
[::std::mem::offset_of!(JSMallocFunctions, js_malloc) - 0usize];
["Offset of field: JSMallocFunctions::js_free"]
[::std::mem::offset_of!(JSMallocFunctions, js_free) - 8usize];
["Offset of field: JSMallocFunctions::js_realloc"]
[::std::mem::offset_of!(JSMallocFunctions, js_realloc) - 16usize];
["Offset of field: JSMallocFunctions::js_malloc_usable_size"]
[::std::mem::offset_of!(JSMallocFunctions, js_malloc_usable_size) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSGCObjectHeader {
_unused: [u8; 0],
}
unsafe extern "C" {
pub fn JS_NewRuntime() -> *mut JSRuntime;
}
unsafe extern "C" {
pub fn JS_SetRuntimeInfo(rt: *mut JSRuntime, info: *const ::std::os::raw::c_char);
}
unsafe extern "C" {
pub fn JS_SetMemoryLimit(rt: *mut JSRuntime, limit: usize);
}
unsafe extern "C" {
pub fn JS_SetGCThreshold(rt: *mut JSRuntime, gc_threshold: usize);
}
unsafe extern "C" {
pub fn JS_SetMaxStackSize(rt: *mut JSRuntime, stack_size: usize);
}
unsafe extern "C" {
pub fn JS_UpdateStackTop(rt: *mut JSRuntime);
}
unsafe extern "C" {
pub fn JS_NewRuntime2(
mf: *const JSMallocFunctions,
opaque: *mut ::std::os::raw::c_void,
) -> *mut JSRuntime;
}
unsafe extern "C" {
pub fn JS_FreeRuntime(rt: *mut JSRuntime);
}
unsafe extern "C" {
pub fn JS_GetRuntimeOpaque(rt: *mut JSRuntime) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn JS_SetRuntimeOpaque(rt: *mut JSRuntime, opaque: *mut ::std::os::raw::c_void);
}
pub type JS_MarkFunc =
::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, gp: *mut JSGCObjectHeader)>;
unsafe extern "C" {
pub fn JS_MarkValue(rt: *mut JSRuntime, val: JSValue, mark_func: JS_MarkFunc);
}
unsafe extern "C" {
pub fn JS_RunGC(rt: *mut JSRuntime);
}
unsafe extern "C" {
pub fn JS_IsLiveObject(rt: *mut JSRuntime, obj: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_NewContext(rt: *mut JSRuntime) -> *mut JSContext;
}
unsafe extern "C" {
pub fn JS_FreeContext(s: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_DupContext(ctx: *mut JSContext) -> *mut JSContext;
}
unsafe extern "C" {
pub fn JS_GetContextOpaque(ctx: *mut JSContext) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn JS_SetContextOpaque(ctx: *mut JSContext, opaque: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
pub fn JS_GetRuntime(ctx: *mut JSContext) -> *mut JSRuntime;
}
unsafe extern "C" {
pub fn JS_SetClassProto(ctx: *mut JSContext, class_id: JSClassID, obj: JSValue);
}
unsafe extern "C" {
pub fn JS_GetClassProto(ctx: *mut JSContext, class_id: JSClassID) -> JSValue;
}
unsafe extern "C" {
pub fn JS_NewContextRaw(rt: *mut JSRuntime) -> *mut JSContext;
}
unsafe extern "C" {
pub fn JS_AddIntrinsicBaseObjects(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicDate(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicEval(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicStringNormalize(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicRegExpCompiler(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicRegExp(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicJSON(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicProxy(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicMapSet(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicTypedArrays(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicPromise(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn JS_AddIntrinsicWeakRef(ctx: *mut JSContext);
}
unsafe extern "C" {
pub fn js_string_codePointRange(
ctx: *mut JSContext,
this_val: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
) -> JSValue;
}
unsafe extern "C" {
pub fn js_malloc_rt(rt: *mut JSRuntime, size: usize) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn js_free_rt(rt: *mut JSRuntime, ptr: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
pub fn js_realloc_rt(
rt: *mut JSRuntime,
ptr: *mut ::std::os::raw::c_void,
size: usize,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn js_malloc_usable_size_rt(
rt: *mut JSRuntime,
ptr: *const ::std::os::raw::c_void,
) -> usize;
}
unsafe extern "C" {
pub fn js_mallocz_rt(rt: *mut JSRuntime, size: usize) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn js_malloc(ctx: *mut JSContext, size: usize) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn js_free(ctx: *mut JSContext, ptr: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
pub fn js_realloc(
ctx: *mut JSContext,
ptr: *mut ::std::os::raw::c_void,
size: usize,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn js_malloc_usable_size(ctx: *mut JSContext, ptr: *const ::std::os::raw::c_void) -> usize;
}
unsafe extern "C" {
pub fn js_realloc2(
ctx: *mut JSContext,
ptr: *mut ::std::os::raw::c_void,
size: usize,
pslack: *mut usize,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn js_mallocz(ctx: *mut JSContext, size: usize) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn js_strdup(
ctx: *mut JSContext,
str_: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn js_strndup(
ctx: *mut JSContext,
s: *const ::std::os::raw::c_char,
n: usize,
) -> *mut ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSMemoryUsage {
pub malloc_size: i64,
pub malloc_limit: i64,
pub memory_used_size: i64,
pub malloc_count: i64,
pub memory_used_count: i64,
pub atom_count: i64,
pub atom_size: i64,
pub str_count: i64,
pub str_size: i64,
pub obj_count: i64,
pub obj_size: i64,
pub prop_count: i64,
pub prop_size: i64,
pub shape_count: i64,
pub shape_size: i64,
pub js_func_count: i64,
pub js_func_size: i64,
pub js_func_code_size: i64,
pub js_func_pc2line_count: i64,
pub js_func_pc2line_size: i64,
pub c_func_count: i64,
pub array_count: i64,
pub fast_array_count: i64,
pub fast_array_elements: i64,
pub binary_object_count: i64,
pub binary_object_size: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSMemoryUsage"][::std::mem::size_of::<JSMemoryUsage>() - 208usize];
["Alignment of JSMemoryUsage"][::std::mem::align_of::<JSMemoryUsage>() - 8usize];
["Offset of field: JSMemoryUsage::malloc_size"]
[::std::mem::offset_of!(JSMemoryUsage, malloc_size) - 0usize];
["Offset of field: JSMemoryUsage::malloc_limit"]
[::std::mem::offset_of!(JSMemoryUsage, malloc_limit) - 8usize];
["Offset of field: JSMemoryUsage::memory_used_size"]
[::std::mem::offset_of!(JSMemoryUsage, memory_used_size) - 16usize];
["Offset of field: JSMemoryUsage::malloc_count"]
[::std::mem::offset_of!(JSMemoryUsage, malloc_count) - 24usize];
["Offset of field: JSMemoryUsage::memory_used_count"]
[::std::mem::offset_of!(JSMemoryUsage, memory_used_count) - 32usize];
["Offset of field: JSMemoryUsage::atom_count"]
[::std::mem::offset_of!(JSMemoryUsage, atom_count) - 40usize];
["Offset of field: JSMemoryUsage::atom_size"]
[::std::mem::offset_of!(JSMemoryUsage, atom_size) - 48usize];
["Offset of field: JSMemoryUsage::str_count"]
[::std::mem::offset_of!(JSMemoryUsage, str_count) - 56usize];
["Offset of field: JSMemoryUsage::str_size"]
[::std::mem::offset_of!(JSMemoryUsage, str_size) - 64usize];
["Offset of field: JSMemoryUsage::obj_count"]
[::std::mem::offset_of!(JSMemoryUsage, obj_count) - 72usize];
["Offset of field: JSMemoryUsage::obj_size"]
[::std::mem::offset_of!(JSMemoryUsage, obj_size) - 80usize];
["Offset of field: JSMemoryUsage::prop_count"]
[::std::mem::offset_of!(JSMemoryUsage, prop_count) - 88usize];
["Offset of field: JSMemoryUsage::prop_size"]
[::std::mem::offset_of!(JSMemoryUsage, prop_size) - 96usize];
["Offset of field: JSMemoryUsage::shape_count"]
[::std::mem::offset_of!(JSMemoryUsage, shape_count) - 104usize];
["Offset of field: JSMemoryUsage::shape_size"]
[::std::mem::offset_of!(JSMemoryUsage, shape_size) - 112usize];
["Offset of field: JSMemoryUsage::js_func_count"]
[::std::mem::offset_of!(JSMemoryUsage, js_func_count) - 120usize];
["Offset of field: JSMemoryUsage::js_func_size"]
[::std::mem::offset_of!(JSMemoryUsage, js_func_size) - 128usize];
["Offset of field: JSMemoryUsage::js_func_code_size"]
[::std::mem::offset_of!(JSMemoryUsage, js_func_code_size) - 136usize];
["Offset of field: JSMemoryUsage::js_func_pc2line_count"]
[::std::mem::offset_of!(JSMemoryUsage, js_func_pc2line_count) - 144usize];
["Offset of field: JSMemoryUsage::js_func_pc2line_size"]
[::std::mem::offset_of!(JSMemoryUsage, js_func_pc2line_size) - 152usize];
["Offset of field: JSMemoryUsage::c_func_count"]
[::std::mem::offset_of!(JSMemoryUsage, c_func_count) - 160usize];
["Offset of field: JSMemoryUsage::array_count"]
[::std::mem::offset_of!(JSMemoryUsage, array_count) - 168usize];
["Offset of field: JSMemoryUsage::fast_array_count"]
[::std::mem::offset_of!(JSMemoryUsage, fast_array_count) - 176usize];
["Offset of field: JSMemoryUsage::fast_array_elements"]
[::std::mem::offset_of!(JSMemoryUsage, fast_array_elements) - 184usize];
["Offset of field: JSMemoryUsage::binary_object_count"]
[::std::mem::offset_of!(JSMemoryUsage, binary_object_count) - 192usize];
["Offset of field: JSMemoryUsage::binary_object_size"]
[::std::mem::offset_of!(JSMemoryUsage, binary_object_size) - 200usize];
};
unsafe extern "C" {
pub fn JS_ComputeMemoryUsage(rt: *mut JSRuntime, s: *mut JSMemoryUsage);
}
unsafe extern "C" {
pub fn JS_DumpMemoryUsage(fp: *mut FILE, s: *const JSMemoryUsage, rt: *mut JSRuntime);
}
unsafe extern "C" {
pub fn JS_NewAtomLen(
ctx: *mut JSContext,
str_: *const ::std::os::raw::c_char,
len: usize,
) -> JSAtom;
}
unsafe extern "C" {
pub fn JS_NewAtom(ctx: *mut JSContext, str_: *const ::std::os::raw::c_char) -> JSAtom;
}
unsafe extern "C" {
pub fn JS_NewAtomUInt32(ctx: *mut JSContext, n: u32) -> JSAtom;
}
unsafe extern "C" {
pub fn JS_DupAtom(ctx: *mut JSContext, v: JSAtom) -> JSAtom;
}
unsafe extern "C" {
pub fn JS_FreeAtom(ctx: *mut JSContext, v: JSAtom);
}
unsafe extern "C" {
pub fn JS_FreeAtomRT(rt: *mut JSRuntime, v: JSAtom);
}
unsafe extern "C" {
pub fn JS_AtomToValue(ctx: *mut JSContext, atom: JSAtom) -> JSValue;
}
unsafe extern "C" {
pub fn JS_AtomToString(ctx: *mut JSContext, atom: JSAtom) -> JSValue;
}
unsafe extern "C" {
pub fn JS_AtomToCStringLen(
ctx: *mut JSContext,
plen: *mut usize,
atom: JSAtom,
) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn JS_ValueToAtom(ctx: *mut JSContext, val: JSValue) -> JSAtom;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSPropertyEnum {
pub is_enumerable: ::std::os::raw::c_int,
pub atom: JSAtom,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSPropertyEnum"][::std::mem::size_of::<JSPropertyEnum>() - 8usize];
["Alignment of JSPropertyEnum"][::std::mem::align_of::<JSPropertyEnum>() - 4usize];
["Offset of field: JSPropertyEnum::is_enumerable"]
[::std::mem::offset_of!(JSPropertyEnum, is_enumerable) - 0usize];
["Offset of field: JSPropertyEnum::atom"]
[::std::mem::offset_of!(JSPropertyEnum, atom) - 4usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSPropertyDescriptor {
pub flags: ::std::os::raw::c_int,
pub value: JSValue,
pub getter: JSValue,
pub setter: JSValue,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSPropertyDescriptor"][::std::mem::size_of::<JSPropertyDescriptor>() - 56usize];
["Alignment of JSPropertyDescriptor"][::std::mem::align_of::<JSPropertyDescriptor>() - 8usize];
["Offset of field: JSPropertyDescriptor::flags"]
[::std::mem::offset_of!(JSPropertyDescriptor, flags) - 0usize];
["Offset of field: JSPropertyDescriptor::value"]
[::std::mem::offset_of!(JSPropertyDescriptor, value) - 8usize];
["Offset of field: JSPropertyDescriptor::getter"]
[::std::mem::offset_of!(JSPropertyDescriptor, getter) - 24usize];
["Offset of field: JSPropertyDescriptor::setter"]
[::std::mem::offset_of!(JSPropertyDescriptor, setter) - 40usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSClassExoticMethods {
pub get_own_property: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
desc: *mut JSPropertyDescriptor,
obj: JSValue,
prop: JSAtom,
) -> ::std::os::raw::c_int,
>,
pub get_own_property_names: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
ptab: *mut *mut JSPropertyEnum,
plen: *mut u32,
obj: JSValue,
) -> ::std::os::raw::c_int,
>,
pub delete_property: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
obj: JSValue,
prop: JSAtom,
) -> ::std::os::raw::c_int,
>,
pub define_own_property: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
this_obj: JSValue,
prop: JSAtom,
val: JSValue,
getter: JSValue,
setter: JSValue,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>,
pub has_property: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
obj: JSValue,
atom: JSAtom,
) -> ::std::os::raw::c_int,
>,
pub get_property: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
obj: JSValue,
atom: JSAtom,
receiver: JSValue,
) -> JSValue,
>,
pub set_property: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
obj: JSValue,
atom: JSAtom,
value: JSValue,
receiver: JSValue,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>,
pub get_prototype:
::std::option::Option<unsafe extern "C" fn(ctx: *mut JSContext, obj: JSValue) -> JSValue>,
pub set_prototype: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
obj: JSValue,
proto_val: JSValue,
) -> ::std::os::raw::c_int,
>,
pub is_extensible: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut JSContext, obj: JSValue) -> ::std::os::raw::c_int,
>,
pub prevent_extensions: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut JSContext, obj: JSValue) -> ::std::os::raw::c_int,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSClassExoticMethods"][::std::mem::size_of::<JSClassExoticMethods>() - 88usize];
["Alignment of JSClassExoticMethods"][::std::mem::align_of::<JSClassExoticMethods>() - 8usize];
["Offset of field: JSClassExoticMethods::get_own_property"]
[::std::mem::offset_of!(JSClassExoticMethods, get_own_property) - 0usize];
["Offset of field: JSClassExoticMethods::get_own_property_names"]
[::std::mem::offset_of!(JSClassExoticMethods, get_own_property_names) - 8usize];
["Offset of field: JSClassExoticMethods::delete_property"]
[::std::mem::offset_of!(JSClassExoticMethods, delete_property) - 16usize];
["Offset of field: JSClassExoticMethods::define_own_property"]
[::std::mem::offset_of!(JSClassExoticMethods, define_own_property) - 24usize];
["Offset of field: JSClassExoticMethods::has_property"]
[::std::mem::offset_of!(JSClassExoticMethods, has_property) - 32usize];
["Offset of field: JSClassExoticMethods::get_property"]
[::std::mem::offset_of!(JSClassExoticMethods, get_property) - 40usize];
["Offset of field: JSClassExoticMethods::set_property"]
[::std::mem::offset_of!(JSClassExoticMethods, set_property) - 48usize];
["Offset of field: JSClassExoticMethods::get_prototype"]
[::std::mem::offset_of!(JSClassExoticMethods, get_prototype) - 56usize];
["Offset of field: JSClassExoticMethods::set_prototype"]
[::std::mem::offset_of!(JSClassExoticMethods, set_prototype) - 64usize];
["Offset of field: JSClassExoticMethods::is_extensible"]
[::std::mem::offset_of!(JSClassExoticMethods, is_extensible) - 72usize];
["Offset of field: JSClassExoticMethods::prevent_extensions"]
[::std::mem::offset_of!(JSClassExoticMethods, prevent_extensions) - 80usize];
};
pub type JSClassFinalizer =
::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, val: JSValue)>;
pub type JSClassGCMark = ::std::option::Option<
unsafe extern "C" fn(rt: *mut JSRuntime, val: JSValue, mark_func: JS_MarkFunc),
>;
pub type JSClassCall = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
func_obj: JSValue,
this_val: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
flags: ::std::os::raw::c_int,
) -> JSValue,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSClassDef {
pub class_name: *const ::std::os::raw::c_char,
pub finalizer: JSClassFinalizer,
pub gc_mark: JSClassGCMark,
pub call: JSClassCall,
pub exotic: *mut JSClassExoticMethods,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSClassDef"][::std::mem::size_of::<JSClassDef>() - 40usize];
["Alignment of JSClassDef"][::std::mem::align_of::<JSClassDef>() - 8usize];
["Offset of field: JSClassDef::class_name"]
[::std::mem::offset_of!(JSClassDef, class_name) - 0usize];
["Offset of field: JSClassDef::finalizer"]
[::std::mem::offset_of!(JSClassDef, finalizer) - 8usize];
["Offset of field: JSClassDef::gc_mark"][::std::mem::offset_of!(JSClassDef, gc_mark) - 16usize];
["Offset of field: JSClassDef::call"][::std::mem::offset_of!(JSClassDef, call) - 24usize];
["Offset of field: JSClassDef::exotic"][::std::mem::offset_of!(JSClassDef, exotic) - 32usize];
};
unsafe extern "C" {
pub fn JS_NewClassID(pclass_id: *mut JSClassID) -> JSClassID;
}
unsafe extern "C" {
pub fn JS_GetClassID(v: JSValue) -> JSClassID;
}
unsafe extern "C" {
pub fn JS_NewClass(
rt: *mut JSRuntime,
class_id: JSClassID,
class_def: *const JSClassDef,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_IsRegisteredClass(rt: *mut JSRuntime, class_id: JSClassID) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_NewBigInt64(ctx: *mut JSContext, v: i64) -> JSValue;
}
unsafe extern "C" {
pub fn JS_NewBigUint64(ctx: *mut JSContext, v: u64) -> JSValue;
}
unsafe extern "C" {
pub fn JS_Throw(ctx: *mut JSContext, obj: JSValue) -> JSValue;
}
unsafe extern "C" {
pub fn JS_SetUncatchableException(ctx: *mut JSContext, flag: ::std::os::raw::c_int);
}
unsafe extern "C" {
pub fn JS_GetException(ctx: *mut JSContext) -> JSValue;
}
unsafe extern "C" {
pub fn JS_HasException(ctx: *mut JSContext) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_IsError(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_NewError(ctx: *mut JSContext) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ThrowSyntaxError(
ctx: *mut JSContext,
fmt: *const ::std::os::raw::c_char,
...
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ThrowTypeError(
ctx: *mut JSContext,
fmt: *const ::std::os::raw::c_char,
...
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ThrowReferenceError(
ctx: *mut JSContext,
fmt: *const ::std::os::raw::c_char,
...
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ThrowRangeError(
ctx: *mut JSContext,
fmt: *const ::std::os::raw::c_char,
...
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ThrowInternalError(
ctx: *mut JSContext,
fmt: *const ::std::os::raw::c_char,
...
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ThrowOutOfMemory(ctx: *mut JSContext) -> JSValue;
}
unsafe extern "C" {
pub fn __JS_FreeValue(ctx: *mut JSContext, v: JSValue);
}
unsafe extern "C" {
pub fn __JS_FreeValueRT(rt: *mut JSRuntime, v: JSValue);
}
unsafe extern "C" {
pub fn JS_StrictEq(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SameValue(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SameValueZero(
ctx: *mut JSContext,
op1: JSValue,
op2: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_ToBool(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_ToInt32(ctx: *mut JSContext, pres: *mut i32, val: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_ToInt64(ctx: *mut JSContext, pres: *mut i64, val: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_ToIndex(ctx: *mut JSContext, plen: *mut u64, val: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_ToFloat64(ctx: *mut JSContext, pres: *mut f64, val: JSValue)
-> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_ToBigInt64(
ctx: *mut JSContext,
pres: *mut i64,
val: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_ToInt64Ext(
ctx: *mut JSContext,
pres: *mut i64,
val: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_NewStringLen(
ctx: *mut JSContext,
str1: *const ::std::os::raw::c_char,
len1: usize,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_NewAtomString(ctx: *mut JSContext, str_: *const ::std::os::raw::c_char) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ToString(ctx: *mut JSContext, val: JSValue) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ToPropertyKey(ctx: *mut JSContext, val: JSValue) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ToCStringLen2(
ctx: *mut JSContext,
plen: *mut usize,
val1: JSValue,
cesu8: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn JS_FreeCString(ctx: *mut JSContext, ptr: *const ::std::os::raw::c_char);
}
unsafe extern "C" {
pub fn JS_NewObjectProtoClass(
ctx: *mut JSContext,
proto: JSValue,
class_id: JSClassID,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_NewObjectClass(ctx: *mut JSContext, class_id: ::std::os::raw::c_int) -> JSValue;
}
unsafe extern "C" {
pub fn JS_NewObjectProto(ctx: *mut JSContext, proto: JSValue) -> JSValue;
}
unsafe extern "C" {
pub fn JS_NewObject(ctx: *mut JSContext) -> JSValue;
}
unsafe extern "C" {
pub fn JS_IsFunction(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_IsConstructor(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetConstructorBit(
ctx: *mut JSContext,
func_obj: JSValue,
val: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_NewArray(ctx: *mut JSContext) -> JSValue;
}
unsafe extern "C" {
pub fn JS_IsArray(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_NewDate(ctx: *mut JSContext, epoch_ms: f64) -> JSValue;
}
unsafe extern "C" {
pub fn JS_GetPropertyInternal(
ctx: *mut JSContext,
obj: JSValue,
prop: JSAtom,
receiver: JSValue,
throw_ref_error: ::std::os::raw::c_int,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_GetPropertyStr(
ctx: *mut JSContext,
this_obj: JSValue,
prop: *const ::std::os::raw::c_char,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_GetPropertyUint32(ctx: *mut JSContext, this_obj: JSValue, idx: u32) -> JSValue;
}
unsafe extern "C" {
pub fn JS_SetPropertyInternal(
ctx: *mut JSContext,
obj: JSValue,
prop: JSAtom,
val: JSValue,
this_obj: JSValue,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetPropertyUint32(
ctx: *mut JSContext,
this_obj: JSValue,
idx: u32,
val: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetPropertyInt64(
ctx: *mut JSContext,
this_obj: JSValue,
idx: i64,
val: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetPropertyStr(
ctx: *mut JSContext,
this_obj: JSValue,
prop: *const ::std::os::raw::c_char,
val: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_HasProperty(
ctx: *mut JSContext,
this_obj: JSValue,
prop: JSAtom,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_IsExtensible(ctx: *mut JSContext, obj: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_PreventExtensions(ctx: *mut JSContext, obj: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_DeleteProperty(
ctx: *mut JSContext,
obj: JSValue,
prop: JSAtom,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetPrototype(
ctx: *mut JSContext,
obj: JSValue,
proto_val: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_GetPrototype(ctx: *mut JSContext, val: JSValue) -> JSValue;
}
unsafe extern "C" {
pub fn JS_GetOwnPropertyNames(
ctx: *mut JSContext,
ptab: *mut *mut JSPropertyEnum,
plen: *mut u32,
obj: JSValue,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_FreePropertyEnum(ctx: *mut JSContext, tab: *mut JSPropertyEnum, len: u32);
}
unsafe extern "C" {
pub fn JS_GetOwnProperty(
ctx: *mut JSContext,
desc: *mut JSPropertyDescriptor,
obj: JSValue,
prop: JSAtom,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_Call(
ctx: *mut JSContext,
func_obj: JSValue,
this_obj: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_Invoke(
ctx: *mut JSContext,
this_val: JSValue,
atom: JSAtom,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_CallConstructor(
ctx: *mut JSContext,
func_obj: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_CallConstructor2(
ctx: *mut JSContext,
func_obj: JSValue,
new_target: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_DetectModule(
input: *const ::std::os::raw::c_char,
input_len: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_Eval(
ctx: *mut JSContext,
input: *const ::std::os::raw::c_char,
input_len: usize,
filename: *const ::std::os::raw::c_char,
eval_flags: ::std::os::raw::c_int,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_EvalThis(
ctx: *mut JSContext,
this_obj: JSValue,
input: *const ::std::os::raw::c_char,
input_len: usize,
filename: *const ::std::os::raw::c_char,
eval_flags: ::std::os::raw::c_int,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_GetGlobalObject(ctx: *mut JSContext) -> JSValue;
}
unsafe extern "C" {
pub fn JS_IsInstanceOf(
ctx: *mut JSContext,
val: JSValue,
obj: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_DefineProperty(
ctx: *mut JSContext,
this_obj: JSValue,
prop: JSAtom,
val: JSValue,
getter: JSValue,
setter: JSValue,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_DefinePropertyValue(
ctx: *mut JSContext,
this_obj: JSValue,
prop: JSAtom,
val: JSValue,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_DefinePropertyValueUint32(
ctx: *mut JSContext,
this_obj: JSValue,
idx: u32,
val: JSValue,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_DefinePropertyValueStr(
ctx: *mut JSContext,
this_obj: JSValue,
prop: *const ::std::os::raw::c_char,
val: JSValue,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_DefinePropertyGetSet(
ctx: *mut JSContext,
this_obj: JSValue,
prop: JSAtom,
getter: JSValue,
setter: JSValue,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetOpaque(obj: JSValue, opaque: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
pub fn JS_GetOpaque(obj: JSValue, class_id: JSClassID) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn JS_GetOpaque2(
ctx: *mut JSContext,
obj: JSValue,
class_id: JSClassID,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn JS_GetAnyOpaque(obj: JSValue, class_id: *mut JSClassID) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn JS_ParseJSON(
ctx: *mut JSContext,
buf: *const ::std::os::raw::c_char,
buf_len: usize,
filename: *const ::std::os::raw::c_char,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ParseJSON2(
ctx: *mut JSContext,
buf: *const ::std::os::raw::c_char,
buf_len: usize,
filename: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_int,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_JSONStringify(
ctx: *mut JSContext,
obj: JSValue,
replacer: JSValue,
space0: JSValue,
) -> JSValue;
}
pub type JSFreeArrayBufferDataFunc = ::std::option::Option<
unsafe extern "C" fn(
rt: *mut JSRuntime,
opaque: *mut ::std::os::raw::c_void,
ptr: *mut ::std::os::raw::c_void,
),
>;
unsafe extern "C" {
pub fn JS_NewArrayBuffer(
ctx: *mut JSContext,
buf: *mut u8,
len: usize,
free_func: JSFreeArrayBufferDataFunc,
opaque: *mut ::std::os::raw::c_void,
is_shared: ::std::os::raw::c_int,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_NewArrayBufferCopy(ctx: *mut JSContext, buf: *const u8, len: usize) -> JSValue;
}
unsafe extern "C" {
pub fn JS_DetachArrayBuffer(ctx: *mut JSContext, obj: JSValue);
}
unsafe extern "C" {
pub fn JS_GetArrayBuffer(ctx: *mut JSContext, psize: *mut usize, obj: JSValue) -> *mut u8;
}
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT8C: JSTypedArrayEnum = 0;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_INT8: JSTypedArrayEnum = 1;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT8: JSTypedArrayEnum = 2;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_INT16: JSTypedArrayEnum = 3;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT16: JSTypedArrayEnum = 4;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_INT32: JSTypedArrayEnum = 5;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT32: JSTypedArrayEnum = 6;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_BIG_INT64: JSTypedArrayEnum = 7;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_BIG_UINT64: JSTypedArrayEnum = 8;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_FLOAT16: JSTypedArrayEnum = 9;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_FLOAT32: JSTypedArrayEnum = 10;
pub const JSTypedArrayEnum_JS_TYPED_ARRAY_FLOAT64: JSTypedArrayEnum = 11;
pub type JSTypedArrayEnum = ::std::os::raw::c_uint;
unsafe extern "C" {
pub fn JS_NewTypedArray(
ctx: *mut JSContext,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
array_type: JSTypedArrayEnum,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_GetTypedArrayBuffer(
ctx: *mut JSContext,
obj: JSValue,
pbyte_offset: *mut usize,
pbyte_length: *mut usize,
pbytes_per_element: *mut usize,
) -> JSValue;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSSharedArrayBufferFunctions {
pub sab_alloc: ::std::option::Option<
unsafe extern "C" fn(
opaque: *mut ::std::os::raw::c_void,
size: usize,
) -> *mut ::std::os::raw::c_void,
>,
pub sab_free: ::std::option::Option<
unsafe extern "C" fn(opaque: *mut ::std::os::raw::c_void, ptr: *mut ::std::os::raw::c_void),
>,
pub sab_dup: ::std::option::Option<
unsafe extern "C" fn(opaque: *mut ::std::os::raw::c_void, ptr: *mut ::std::os::raw::c_void),
>,
pub sab_opaque: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSSharedArrayBufferFunctions"]
[::std::mem::size_of::<JSSharedArrayBufferFunctions>() - 32usize];
["Alignment of JSSharedArrayBufferFunctions"]
[::std::mem::align_of::<JSSharedArrayBufferFunctions>() - 8usize];
["Offset of field: JSSharedArrayBufferFunctions::sab_alloc"]
[::std::mem::offset_of!(JSSharedArrayBufferFunctions, sab_alloc) - 0usize];
["Offset of field: JSSharedArrayBufferFunctions::sab_free"]
[::std::mem::offset_of!(JSSharedArrayBufferFunctions, sab_free) - 8usize];
["Offset of field: JSSharedArrayBufferFunctions::sab_dup"]
[::std::mem::offset_of!(JSSharedArrayBufferFunctions, sab_dup) - 16usize];
["Offset of field: JSSharedArrayBufferFunctions::sab_opaque"]
[::std::mem::offset_of!(JSSharedArrayBufferFunctions, sab_opaque) - 24usize];
};
unsafe extern "C" {
pub fn JS_SetSharedArrayBufferFunctions(
rt: *mut JSRuntime,
sf: *const JSSharedArrayBufferFunctions,
);
}
pub const JSPromiseStateEnum_JS_PROMISE_PENDING: JSPromiseStateEnum = 0;
pub const JSPromiseStateEnum_JS_PROMISE_FULFILLED: JSPromiseStateEnum = 1;
pub const JSPromiseStateEnum_JS_PROMISE_REJECTED: JSPromiseStateEnum = 2;
pub type JSPromiseStateEnum = ::std::os::raw::c_uint;
unsafe extern "C" {
pub fn JS_NewPromiseCapability(ctx: *mut JSContext, resolving_funcs: *mut JSValue) -> JSValue;
}
unsafe extern "C" {
pub fn JS_PromiseState(ctx: *mut JSContext, promise: JSValue) -> JSPromiseStateEnum;
}
unsafe extern "C" {
pub fn JS_PromiseResult(ctx: *mut JSContext, promise: JSValue) -> JSValue;
}
pub type JSHostPromiseRejectionTracker = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
promise: JSValue,
reason: JSValue,
is_handled: ::std::os::raw::c_int,
opaque: *mut ::std::os::raw::c_void,
),
>;
unsafe extern "C" {
pub fn JS_SetHostPromiseRejectionTracker(
rt: *mut JSRuntime,
cb: JSHostPromiseRejectionTracker,
opaque: *mut ::std::os::raw::c_void,
);
}
pub type JSInterruptHandler = ::std::option::Option<
unsafe extern "C" fn(
rt: *mut JSRuntime,
opaque: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn JS_SetInterruptHandler(
rt: *mut JSRuntime,
cb: JSInterruptHandler,
opaque: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn JS_SetCanBlock(rt: *mut JSRuntime, can_block: ::std::os::raw::c_int);
}
unsafe extern "C" {
pub fn JS_SetStripInfo(rt: *mut JSRuntime, flags: ::std::os::raw::c_int);
}
unsafe extern "C" {
pub fn JS_GetStripInfo(rt: *mut JSRuntime) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetIsHTMLDDA(ctx: *mut JSContext, obj: JSValue);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSModuleDef {
_unused: [u8; 0],
}
pub type JSModuleNormalizeFunc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
module_base_name: *const ::std::os::raw::c_char,
module_name: *const ::std::os::raw::c_char,
opaque: *mut ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_char,
>;
pub type JSModuleLoaderFunc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
module_name: *const ::std::os::raw::c_char,
opaque: *mut ::std::os::raw::c_void,
) -> *mut JSModuleDef,
>;
pub type JSModuleLoaderFunc2 = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
module_name: *const ::std::os::raw::c_char,
opaque: *mut ::std::os::raw::c_void,
attributes: JSValue,
) -> *mut JSModuleDef,
>;
pub type JSModuleCheckSupportedImportAttributes = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
opaque: *mut ::std::os::raw::c_void,
attributes: JSValue,
) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn JS_SetModuleLoaderFunc(
rt: *mut JSRuntime,
module_normalize: JSModuleNormalizeFunc,
module_loader: JSModuleLoaderFunc,
opaque: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn JS_SetModuleLoaderFunc2(
rt: *mut JSRuntime,
module_normalize: JSModuleNormalizeFunc,
module_loader: JSModuleLoaderFunc2,
module_check_attrs: JSModuleCheckSupportedImportAttributes,
opaque: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn JS_GetImportMeta(ctx: *mut JSContext, m: *mut JSModuleDef) -> JSValue;
}
unsafe extern "C" {
pub fn JS_GetModuleName(ctx: *mut JSContext, m: *mut JSModuleDef) -> JSAtom;
}
unsafe extern "C" {
pub fn JS_GetModuleNamespace(ctx: *mut JSContext, m: *mut JSModuleDef) -> JSValue;
}
pub type JSJobFunc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
) -> JSValue,
>;
unsafe extern "C" {
pub fn JS_EnqueueJob(
ctx: *mut JSContext,
job_func: JSJobFunc,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_IsJobPending(rt: *mut JSRuntime) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_ExecutePendingJob(
rt: *mut JSRuntime,
pctx: *mut *mut JSContext,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_WriteObject(
ctx: *mut JSContext,
psize: *mut usize,
obj: JSValue,
flags: ::std::os::raw::c_int,
) -> *mut u8;
}
unsafe extern "C" {
pub fn JS_WriteObject2(
ctx: *mut JSContext,
psize: *mut usize,
obj: JSValue,
flags: ::std::os::raw::c_int,
psab_tab: *mut *mut *mut u8,
psab_tab_len: *mut usize,
) -> *mut u8;
}
unsafe extern "C" {
pub fn JS_ReadObject(
ctx: *mut JSContext,
buf: *const u8,
buf_len: usize,
flags: ::std::os::raw::c_int,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_EvalFunction(ctx: *mut JSContext, fun_obj: JSValue) -> JSValue;
}
unsafe extern "C" {
pub fn JS_ResolveModule(ctx: *mut JSContext, obj: JSValue) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_GetScriptOrModuleName(
ctx: *mut JSContext,
n_stack_levels: ::std::os::raw::c_int,
) -> JSAtom;
}
unsafe extern "C" {
pub fn JS_LoadModule(
ctx: *mut JSContext,
basename: *const ::std::os::raw::c_char,
filename: *const ::std::os::raw::c_char,
) -> JSValue;
}
pub const JSCFunctionEnum_JS_CFUNC_generic: JSCFunctionEnum = 0;
pub const JSCFunctionEnum_JS_CFUNC_generic_magic: JSCFunctionEnum = 1;
pub const JSCFunctionEnum_JS_CFUNC_constructor: JSCFunctionEnum = 2;
pub const JSCFunctionEnum_JS_CFUNC_constructor_magic: JSCFunctionEnum = 3;
pub const JSCFunctionEnum_JS_CFUNC_constructor_or_func: JSCFunctionEnum = 4;
pub const JSCFunctionEnum_JS_CFUNC_constructor_or_func_magic: JSCFunctionEnum = 5;
pub const JSCFunctionEnum_JS_CFUNC_f_f: JSCFunctionEnum = 6;
pub const JSCFunctionEnum_JS_CFUNC_f_f_f: JSCFunctionEnum = 7;
pub const JSCFunctionEnum_JS_CFUNC_getter: JSCFunctionEnum = 8;
pub const JSCFunctionEnum_JS_CFUNC_setter: JSCFunctionEnum = 9;
pub const JSCFunctionEnum_JS_CFUNC_getter_magic: JSCFunctionEnum = 10;
pub const JSCFunctionEnum_JS_CFUNC_setter_magic: JSCFunctionEnum = 11;
pub const JSCFunctionEnum_JS_CFUNC_iterator_next: JSCFunctionEnum = 12;
pub type JSCFunctionEnum = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub union JSCFunctionType {
pub generic: JSCFunction,
pub generic_magic: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
this_val: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
magic: ::std::os::raw::c_int,
) -> JSValue,
>,
pub constructor: JSCFunction,
pub constructor_magic: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
new_target: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
magic: ::std::os::raw::c_int,
) -> JSValue,
>,
pub constructor_or_func: JSCFunction,
pub f_f: ::std::option::Option<unsafe extern "C" fn(arg1: f64) -> f64>,
pub f_f_f: ::std::option::Option<unsafe extern "C" fn(arg1: f64, arg2: f64) -> f64>,
pub getter: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut JSContext, this_val: JSValue) -> JSValue,
>,
pub setter: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut JSContext, this_val: JSValue, val: JSValue) -> JSValue,
>,
pub getter_magic: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
this_val: JSValue,
magic: ::std::os::raw::c_int,
) -> JSValue,
>,
pub setter_magic: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
this_val: JSValue,
val: JSValue,
magic: ::std::os::raw::c_int,
) -> JSValue,
>,
pub iterator_next: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut JSContext,
this_val: JSValue,
argc: ::std::os::raw::c_int,
argv: *mut JSValue,
pdone: *mut ::std::os::raw::c_int,
magic: ::std::os::raw::c_int,
) -> JSValue,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSCFunctionType"][::std::mem::size_of::<JSCFunctionType>() - 8usize];
["Alignment of JSCFunctionType"][::std::mem::align_of::<JSCFunctionType>() - 8usize];
["Offset of field: JSCFunctionType::generic"]
[::std::mem::offset_of!(JSCFunctionType, generic) - 0usize];
["Offset of field: JSCFunctionType::generic_magic"]
[::std::mem::offset_of!(JSCFunctionType, generic_magic) - 0usize];
["Offset of field: JSCFunctionType::constructor"]
[::std::mem::offset_of!(JSCFunctionType, constructor) - 0usize];
["Offset of field: JSCFunctionType::constructor_magic"]
[::std::mem::offset_of!(JSCFunctionType, constructor_magic) - 0usize];
["Offset of field: JSCFunctionType::constructor_or_func"]
[::std::mem::offset_of!(JSCFunctionType, constructor_or_func) - 0usize];
["Offset of field: JSCFunctionType::f_f"]
[::std::mem::offset_of!(JSCFunctionType, f_f) - 0usize];
["Offset of field: JSCFunctionType::f_f_f"]
[::std::mem::offset_of!(JSCFunctionType, f_f_f) - 0usize];
["Offset of field: JSCFunctionType::getter"]
[::std::mem::offset_of!(JSCFunctionType, getter) - 0usize];
["Offset of field: JSCFunctionType::setter"]
[::std::mem::offset_of!(JSCFunctionType, setter) - 0usize];
["Offset of field: JSCFunctionType::getter_magic"]
[::std::mem::offset_of!(JSCFunctionType, getter_magic) - 0usize];
["Offset of field: JSCFunctionType::setter_magic"]
[::std::mem::offset_of!(JSCFunctionType, setter_magic) - 0usize];
["Offset of field: JSCFunctionType::iterator_next"]
[::std::mem::offset_of!(JSCFunctionType, iterator_next) - 0usize];
};
unsafe extern "C" {
pub fn JS_NewCFunction2(
ctx: *mut JSContext,
func: JSCFunction,
name: *const ::std::os::raw::c_char,
length: ::std::os::raw::c_int,
cproto: JSCFunctionEnum,
magic: ::std::os::raw::c_int,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_NewCFunctionData(
ctx: *mut JSContext,
func: JSCFunctionData,
length: ::std::os::raw::c_int,
magic: ::std::os::raw::c_int,
data_len: ::std::os::raw::c_int,
data: *mut JSValue,
) -> JSValue;
}
unsafe extern "C" {
pub fn JS_SetConstructor(ctx: *mut JSContext, func_obj: JSValue, proto: JSValue);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSCFunctionListEntry {
pub name: *const ::std::os::raw::c_char,
pub prop_flags: u8,
pub def_type: u8,
pub magic: i16,
pub u: JSCFunctionListEntry__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union JSCFunctionListEntry__bindgen_ty_1 {
pub func: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1,
pub getset: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2,
pub alias: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3,
pub prop_list: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4,
pub str_: *const ::std::os::raw::c_char,
pub i32_: i32,
pub i64_: i64,
pub f64_: f64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1 {
pub length: u8,
pub cproto: u8,
pub cfunc: JSCFunctionType,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1"]
[::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1>() - 16usize];
["Alignment of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1"]
[::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1>() - 8usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1::length"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1, length) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1::cproto"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1, cproto) - 1usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1::cfunc"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1, cfunc) - 8usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2 {
pub get: JSCFunctionType,
pub set: JSCFunctionType,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2"]
[::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2>() - 16usize];
["Alignment of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2"]
[::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2>() - 8usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2::get"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2, get) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2::set"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2, set) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3 {
pub name: *const ::std::os::raw::c_char,
pub base: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3"]
[::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3>() - 16usize];
["Alignment of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3"]
[::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3>() - 8usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3::name"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3, name) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3::base"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3, base) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4 {
pub tab: *const JSCFunctionListEntry,
pub len: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4"]
[::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4>() - 16usize];
["Alignment of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4"]
[::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4>() - 8usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4::tab"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4, tab) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4::len"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4, len) - 8usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSCFunctionListEntry__bindgen_ty_1"]
[::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1>() - 16usize];
["Alignment of JSCFunctionListEntry__bindgen_ty_1"]
[::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1>() - 8usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1::func"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, func) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1::getset"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, getset) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1::alias"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, alias) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1::prop_list"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, prop_list) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1::str_"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, str_) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1::i32_"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, i32_) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1::i64_"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, i64_) - 0usize];
["Offset of field: JSCFunctionListEntry__bindgen_ty_1::f64_"]
[::std::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, f64_) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSCFunctionListEntry"][::std::mem::size_of::<JSCFunctionListEntry>() - 32usize];
["Alignment of JSCFunctionListEntry"][::std::mem::align_of::<JSCFunctionListEntry>() - 8usize];
["Offset of field: JSCFunctionListEntry::name"]
[::std::mem::offset_of!(JSCFunctionListEntry, name) - 0usize];
["Offset of field: JSCFunctionListEntry::prop_flags"]
[::std::mem::offset_of!(JSCFunctionListEntry, prop_flags) - 8usize];
["Offset of field: JSCFunctionListEntry::def_type"]
[::std::mem::offset_of!(JSCFunctionListEntry, def_type) - 9usize];
["Offset of field: JSCFunctionListEntry::magic"]
[::std::mem::offset_of!(JSCFunctionListEntry, magic) - 10usize];
["Offset of field: JSCFunctionListEntry::u"]
[::std::mem::offset_of!(JSCFunctionListEntry, u) - 16usize];
};
unsafe extern "C" {
pub fn JS_SetPropertyFunctionList(
ctx: *mut JSContext,
obj: JSValue,
tab: *const JSCFunctionListEntry,
len: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
pub type JSModuleInitFunc = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut JSContext, m: *mut JSModuleDef) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn JS_NewCModule(
ctx: *mut JSContext,
name_str: *const ::std::os::raw::c_char,
func: JSModuleInitFunc,
) -> *mut JSModuleDef;
}
unsafe extern "C" {
pub fn JS_AddModuleExport(
ctx: *mut JSContext,
m: *mut JSModuleDef,
name_str: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_AddModuleExportList(
ctx: *mut JSContext,
m: *mut JSModuleDef,
tab: *const JSCFunctionListEntry,
len: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetModuleExport(
ctx: *mut JSContext,
m: *mut JSModuleDef,
export_name: *const ::std::os::raw::c_char,
val: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetModuleExportList(
ctx: *mut JSContext,
m: *mut JSModuleDef,
tab: *const JSCFunctionListEntry,
len: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_SetModulePrivateValue(
ctx: *mut JSContext,
m: *mut JSModuleDef,
val: JSValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn JS_GetModulePrivateValue(ctx: *mut JSContext, m: *mut JSModuleDef) -> JSValue;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSPrintValueOptions {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
pub max_depth: u32,
pub max_string_length: u32,
pub max_item_count: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of JSPrintValueOptions"][::std::mem::size_of::<JSPrintValueOptions>() - 16usize];
["Alignment of JSPrintValueOptions"][::std::mem::align_of::<JSPrintValueOptions>() - 4usize];
["Offset of field: JSPrintValueOptions::max_depth"]
[::std::mem::offset_of!(JSPrintValueOptions, max_depth) - 4usize];
["Offset of field: JSPrintValueOptions::max_string_length"]
[::std::mem::offset_of!(JSPrintValueOptions, max_string_length) - 8usize];
["Offset of field: JSPrintValueOptions::max_item_count"]
[::std::mem::offset_of!(JSPrintValueOptions, max_item_count) - 12usize];
};
impl JSPrintValueOptions {
#[inline]
pub fn show_hidden(&self) -> ::std::os::raw::c_int {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
}
#[inline]
pub fn set_show_hidden(&mut self, val: ::std::os::raw::c_int) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn show_hidden_raw(this: *const Self) -> ::std::os::raw::c_int {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
0usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_show_hidden_raw(this: *mut Self, val: ::std::os::raw::c_int) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
0usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn raw_dump(&self) -> ::std::os::raw::c_int {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) }
}
#[inline]
pub fn set_raw_dump(&mut self, val: ::std::os::raw::c_int) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn raw_dump_raw(this: *const Self) -> ::std::os::raw::c_int {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
8usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_raw_dump_raw(this: *mut Self, val: ::std::os::raw::c_int) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
8usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn new_bitfield_1(
show_hidden: ::std::os::raw::c_int,
raw_dump: ::std::os::raw::c_int,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let show_hidden: u32 = unsafe { ::std::mem::transmute(show_hidden) };
show_hidden as u64
});
__bindgen_bitfield_unit.set(8usize, 8u8, {
let raw_dump: u32 = unsafe { ::std::mem::transmute(raw_dump) };
raw_dump as u64
});
__bindgen_bitfield_unit
}
}
pub type JSPrintValueWrite = ::std::option::Option<
unsafe extern "C" fn(
opaque: *mut ::std::os::raw::c_void,
buf: *const ::std::os::raw::c_char,
len: usize,
),
>;
unsafe extern "C" {
pub fn JS_PrintValueSetDefaultOptions(options: *mut JSPrintValueOptions);
}
unsafe extern "C" {
pub fn JS_PrintValueRT(
rt: *mut JSRuntime,
write_func: JSPrintValueWrite,
write_opaque: *mut ::std::os::raw::c_void,
val: JSValue,
options: *const JSPrintValueOptions,
);
}
unsafe extern "C" {
pub fn JS_PrintValue(
ctx: *mut JSContext,
write_func: JSPrintValueWrite,
write_opaque: *mut ::std::os::raw::c_void,
val: JSValue,
options: *const JSPrintValueOptions,
);
}
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __va_list_tag {
pub gp_offset: ::std::os::raw::c_uint,
pub fp_offset: ::std::os::raw::c_uint,
pub overflow_arg_area: *mut ::std::os::raw::c_void,
pub reg_save_area: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize];
["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize];
["Offset of field: __va_list_tag::gp_offset"]
[::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize];
["Offset of field: __va_list_tag::fp_offset"]
[::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize];
["Offset of field: __va_list_tag::overflow_arg_area"]
[::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize];
["Offset of field: __va_list_tag::reg_save_area"]
[::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_data {
pub _address: u8,
}