Created
December 5, 2019 19:13
-
-
Save GoNZooo/973571ca3011834026bb539a28336650 to your computer and use it in GitHub Desktop.
Link error hello world NIF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// c version: | |
// #include <erl_nif.h> | |
// static ERL_NIF_TERM hello(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) | |
// { | |
// return enif_make_string(env, "Hello World!", ERL_NIF_LATIN1); | |
// } | |
// static ErlNifFunc nif_funcs[] = {"hello", 0, hello}; | |
// ERL_NIF_INIT(Elixir.HelloWorld, nif_funcs, NULL, NULL, NULL, NULL); | |
const erl = @cImport({ | |
@cInclude("erl_nif.h"); | |
}); | |
export fn hello(env: ?*erl.ErlNifEnv, argc: c_int, argv: [*c]const c_ulong) erl.ERL_NIF_TERM { | |
return erl.enif_make_string(env, "Hello World from Zig!", erl.ErlNifCharEncoding.ERL_NIF_LATIN1); | |
} | |
// `erl_nif.h` defines this function structure | |
// typedef struct enif_func_t | |
// { | |
// const char* name; | |
// unsigned arity; | |
// ERL_NIF_TERM (*fptr)(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); | |
// unsigned flags; | |
// }ErlNifFunc; | |
export var nif_funcs = [_]erl.ErlNifFunc{erl.ErlNifFunc{ | |
.name = "hello", | |
.arity = 0, | |
.fptr = hello, | |
.flags = 0, | |
}}; | |
// This is the `erl_nif.h` entry specification; it's what's actually exported when you use | |
// `ERL_NIF_INIT(...)`: | |
// typedef struct enif_entry_t | |
// { | |
// int major; | |
// int minor; | |
// const char* name; | |
// int num_of_funcs; | |
// ErlNifFunc* funcs; | |
// int (*load) (ErlNifEnv*, void** priv_data, ERL_NIF_TERM load_info); | |
// int (*reload) (ErlNifEnv*, void** priv_data, ERL_NIF_TERM load_info); | |
// int (*upgrade)(ErlNifEnv*, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info); | |
// void (*unload) (ErlNifEnv*, void* priv_data); | |
// /* Added in 2.1 */ | |
// const char* vm_variant; | |
// /* Added in 2.7 */ | |
// unsigned options; /* Unused. Can be set to 0 or 1 (dirty sched config) */ | |
// /* Added in 2.12 */ | |
// size_t sizeof_ErlNifResourceTypeInit; | |
// /* Added in 2.14 */ | |
// const char* min_erts; | |
// }ErlNifEntry; | |
export fn nif_init() *erl.ErlNifEntry { | |
return &entry; | |
} | |
extern var entry: erl.ErlNifEntry = erl.ErlNifEntry{ | |
.major = erl.ERL_NIF_MAJOR_VERSION, | |
.minor = erl.ERL_NIF_MINOR_VERSION, | |
.name = "Elixir.HelloWorld", | |
.num_of_funcs = 1, | |
.funcs = &nif_funcs, | |
.load = null, | |
.reload = null, | |
.upgrade = null, | |
.unload = null, | |
.vm_variant = "beam.vanilla", | |
.options = 1, | |
.sizeof_ErlNifResourceTypeInit = @sizeOf(erl.ErlNifResourceTypeInit), | |
.min_erts = "erts-10.4", | |
}; | |
// c-import | |
pub const ErlDrvSysInfo = extern struct { | |
driver_major_version: c_int, | |
driver_minor_version: c_int, | |
erts_version: [*c]u8, | |
otp_release: [*c]u8, | |
thread_support: c_int, | |
smp_support: c_int, | |
async_threads: c_int, | |
scheduler_threads: c_int, | |
nif_major_version: c_int, | |
nif_minor_version: c_int, | |
dirty_scheduler_support: c_int, | |
}; | |
pub const ErlDrvThreadOpts = extern struct { | |
suggested_stack_size: c_int, | |
}; | |
pub const ERL_DIRTY_JOB_CPU_BOUND = 1; | |
pub const ERL_DIRTY_JOB_IO_BOUND = 2; | |
pub const ErlDirtyJobFlags = extern enum { | |
ERL_DIRTY_JOB_CPU_BOUND = 1, | |
ERL_DIRTY_JOB_IO_BOUND = 2, | |
}; | |
pub const ERL_NIF_SELECT_READ = enum_ErlNifSelectFlags.ERL_NIF_SELECT_READ; | |
pub const ERL_NIF_SELECT_WRITE = enum_ErlNifSelectFlags.ERL_NIF_SELECT_WRITE; | |
pub const ERL_NIF_SELECT_STOP = enum_ErlNifSelectFlags.ERL_NIF_SELECT_STOP; | |
pub const ERL_NIF_SELECT_CANCEL = enum_ErlNifSelectFlags.ERL_NIF_SELECT_CANCEL; | |
pub const ERL_NIF_SELECT_CUSTOM_MSG = enum_ErlNifSelectFlags.ERL_NIF_SELECT_CUSTOM_MSG; | |
pub const enum_ErlNifSelectFlags = extern enum { | |
ERL_NIF_SELECT_READ = 1, | |
ERL_NIF_SELECT_WRITE = 2, | |
ERL_NIF_SELECT_STOP = 4, | |
ERL_NIF_SELECT_CANCEL = 8, | |
ERL_NIF_SELECT_CUSTOM_MSG = 16, | |
}; | |
pub const ErlDrvMonitor = extern struct { | |
data: [32]u8, | |
}; | |
pub const ErlNapiUInt64 = c_ulong; | |
pub const ErlNapiSInt64 = c_long; | |
pub const ErlNapiUInt = ErlNapiUInt64; | |
pub const ErlNapiSInt = ErlNapiSInt64; | |
pub const __u_char = u8; | |
pub const __u_short = c_ushort; | |
pub const __u_int = c_uint; | |
pub const __u_long = c_ulong; | |
pub const __int8_t = i8; | |
pub const __uint8_t = u8; | |
pub const __int16_t = c_short; | |
pub const __uint16_t = c_ushort; | |
pub const __int32_t = c_int; | |
pub const __uint32_t = c_uint; | |
pub const __int64_t = c_long; | |
pub const __uint64_t = c_ulong; | |
pub const __int_least8_t = __int8_t; | |
pub const __uint_least8_t = __uint8_t; | |
pub const __int_least16_t = __int16_t; | |
pub const __uint_least16_t = __uint16_t; | |
pub const __int_least32_t = __int32_t; | |
pub const __uint_least32_t = __uint32_t; | |
pub const __int_least64_t = __int64_t; | |
pub const __uint_least64_t = __uint64_t; | |
pub const __quad_t = c_long; | |
pub const __u_quad_t = c_ulong; | |
pub const __intmax_t = c_long; | |
pub const __uintmax_t = c_ulong; | |
pub const __dev_t = c_ulong; | |
pub const __uid_t = c_uint; | |
pub const __gid_t = c_uint; | |
pub const __ino_t = c_ulong; | |
pub const __ino64_t = c_ulong; | |
pub const __mode_t = c_uint; | |
pub const __nlink_t = c_ulong; | |
pub const __off_t = c_long; | |
pub const __off64_t = c_long; | |
pub const __pid_t = c_int; | |
pub const __fsid_t = extern struct { | |
__val: [2]c_int, | |
}; | |
pub const __clock_t = c_long; | |
pub const __rlim_t = c_ulong; | |
pub const __rlim64_t = c_ulong; | |
pub const __id_t = c_uint; | |
pub const __time_t = c_long; | |
pub const __useconds_t = c_uint; | |
pub const __suseconds_t = c_long; | |
pub const __daddr_t = c_int; | |
pub const __key_t = c_int; | |
pub const __clockid_t = c_int; | |
pub const __timer_t = ?*c_void; | |
pub const __blksize_t = c_long; | |
pub const __blkcnt_t = c_long; | |
pub const __blkcnt64_t = c_long; | |
pub const __fsblkcnt_t = c_ulong; | |
pub const __fsblkcnt64_t = c_ulong; | |
pub const __fsfilcnt_t = c_ulong; | |
pub const __fsfilcnt64_t = c_ulong; | |
pub const __fsword_t = c_long; | |
pub const __ssize_t = c_long; | |
pub const __syscall_slong_t = c_long; | |
pub const __syscall_ulong_t = c_ulong; | |
pub const __loff_t = __off64_t; | |
pub const __caddr_t = [*c]u8; | |
pub const __intptr_t = c_long; | |
pub const __socklen_t = c_uint; | |
pub const __sig_atomic_t = c_int; | |
pub const u_char = __u_char; | |
pub const u_short = __u_short; | |
pub const u_int = __u_int; | |
pub const u_long = __u_long; | |
pub const quad_t = __quad_t; | |
pub const u_quad_t = __u_quad_t; | |
pub const fsid_t = __fsid_t; | |
pub const loff_t = __loff_t; | |
pub const ino_t = __ino_t; | |
pub const dev_t = __dev_t; | |
pub const gid_t = __gid_t; | |
pub const mode_t = __mode_t; | |
pub const nlink_t = __nlink_t; | |
pub const uid_t = __uid_t; | |
pub const off_t = __off_t; | |
pub const pid_t = __pid_t; | |
pub const id_t = __id_t; | |
pub const daddr_t = __daddr_t; | |
pub const caddr_t = __caddr_t; | |
pub const key_t = __key_t; | |
pub const clock_t = __clock_t; | |
pub const clockid_t = __clockid_t; | |
pub const time_t = __time_t; | |
pub const timer_t = __timer_t; | |
pub const ulong = c_ulong; | |
pub const ushort = c_ushort; | |
pub const uint = c_uint; | |
pub const u_int8_t = __uint8_t; | |
pub const u_int16_t = __uint16_t; | |
pub const u_int32_t = __uint32_t; | |
pub const u_int64_t = __uint64_t; | |
pub const register_t = c_long; | |
pub fn __bswap_16(__bsx: __uint16_t) __uint16_t { | |
return @as(__uint16_t, ((@as(c_int, __bsx) >> @as(@import("std").math.Log2Int(c_int), 8)) & 255) | ((@as(c_int, __bsx) & 255) << @as(@import("std").math.Log2Int(c_int), 8))); | |
} | |
pub fn __bswap_32(__bsx: __uint32_t) __uint32_t { | |
return ((((__bsx & 4278190080) >> @as(@import("std").math.Log2Int(c_uint), 24)) | ((__bsx & 16711680) >> @as(@import("std").math.Log2Int(c_uint), 8))) | ((__bsx & 65280) << @as(@import("std").math.Log2Int(c_uint), 8))) | ((__bsx & 255) << @as(@import("std").math.Log2Int(c_uint), 24)); | |
} | |
pub fn __bswap_64(__bsx: __uint64_t) __uint64_t { | |
return @as(__uint64_t, ((((((((@as(c_ulonglong, __bsx) & 18374686479671623680) >> @as(@import("std").math.Log2Int(c_ulonglong), 56)) | ((@as(c_ulonglong, __bsx) & 71776119061217280) >> @as(@import("std").math.Log2Int(c_ulonglong), 40))) | ((@as(c_ulonglong, __bsx) & 280375465082880) >> @as(@import("std").math.Log2Int(c_ulonglong), 24))) | ((@as(c_ulonglong, __bsx) & 1095216660480) >> @as(@import("std").math.Log2Int(c_ulonglong), 8))) | ((@as(c_ulonglong, __bsx) & 4278190080) << @as(@import("std").math.Log2Int(c_ulonglong), 8))) | ((@as(c_ulonglong, __bsx) & 16711680) << @as(@import("std").math.Log2Int(c_ulonglong), 24))) | ((@as(c_ulonglong, __bsx) & 65280) << @as(@import("std").math.Log2Int(c_ulonglong), 40))) | ((@as(c_ulonglong, __bsx) & 255) << @as(@import("std").math.Log2Int(c_ulonglong), 56))); | |
} | |
pub fn __uint16_identity(__x: __uint16_t) __uint16_t { | |
return __x; | |
} | |
pub fn __uint32_identity(__x: __uint32_t) __uint32_t { | |
return __x; | |
} | |
pub fn __uint64_identity(__x: __uint64_t) __uint64_t { | |
return __x; | |
} | |
pub const __sigset_t = extern struct { | |
__val: [16]c_ulong, | |
}; | |
pub const sigset_t = __sigset_t; | |
pub const struct_timeval = extern struct { | |
tv_sec: __time_t, | |
tv_usec: __suseconds_t, | |
}; | |
pub const struct_timespec = extern struct { | |
tv_sec: __time_t, | |
tv_nsec: __syscall_slong_t, | |
}; | |
pub const suseconds_t = __suseconds_t; | |
pub const __fd_mask = c_long; | |
pub const fd_set = extern struct { | |
__fds_bits: [16]__fd_mask, | |
}; | |
pub const fd_mask = __fd_mask; | |
pub extern fn select(__nfds: c_int, noalias __readfds: [*c]fd_set, noalias __writefds: [*c]fd_set, noalias __exceptfds: [*c]fd_set, noalias __timeout: [*c]struct_timeval) c_int; | |
pub extern fn pselect(__nfds: c_int, noalias __readfds: [*c]fd_set, noalias __writefds: [*c]fd_set, noalias __exceptfds: [*c]fd_set, noalias __timeout: [*c]const struct_timespec, noalias __sigmask: [*c]const __sigset_t) c_int; | |
pub const blksize_t = __blksize_t; | |
pub const blkcnt_t = __blkcnt_t; | |
pub const fsblkcnt_t = __fsblkcnt_t; | |
pub const fsfilcnt_t = __fsfilcnt_t; | |
pub const struct___pthread_rwlock_arch_t = extern struct { | |
__readers: c_uint, | |
__writers: c_uint, | |
__wrphase_futex: c_uint, | |
__writers_futex: c_uint, | |
__pad3: c_uint, | |
__pad4: c_uint, | |
__cur_writer: c_int, | |
__shared: c_int, | |
__rwelision: i8, | |
__pad1: [7]u8, | |
__pad2: c_ulong, | |
__flags: c_uint, | |
}; | |
pub const struct___pthread_internal_list = extern struct { | |
__prev: [*c]struct___pthread_internal_list, | |
__next: [*c]struct___pthread_internal_list, | |
}; | |
pub const __pthread_list_t = struct___pthread_internal_list; | |
pub const struct___pthread_mutex_s = extern struct { | |
__lock: c_int, | |
__count: c_uint, | |
__owner: c_int, | |
__nusers: c_uint, | |
__kind: c_int, | |
__spins: c_short, | |
__elision: c_short, | |
__list: __pthread_list_t, | |
}; | |
pub const struct___pthread_cond_s = extern struct { | |
@"": extern union { | |
__wseq: c_ulonglong, | |
__wseq32: extern struct { | |
__low: c_uint, | |
__high: c_uint, | |
}, | |
}, | |
@"": extern union { | |
__g1_start: c_ulonglong, | |
__g1_start32: extern struct { | |
__low: c_uint, | |
__high: c_uint, | |
}, | |
}, | |
__g_refs: [2]c_uint, | |
__g_size: [2]c_uint, | |
__g1_orig_size: c_uint, | |
__wrefs: c_uint, | |
__g_signals: [2]c_uint, | |
}; | |
pub const pthread_t = c_ulong; | |
pub const pthread_mutexattr_t = extern union { | |
__size: [4]u8, | |
__align: c_int, | |
}; | |
pub const pthread_condattr_t = extern union { | |
__size: [4]u8, | |
__align: c_int, | |
}; | |
pub const pthread_key_t = c_uint; | |
pub const pthread_once_t = c_int; | |
pub const union_pthread_attr_t = extern union { | |
__size: [56]u8, | |
__align: c_long, | |
}; | |
pub const pthread_attr_t = union_pthread_attr_t; | |
pub const pthread_mutex_t = extern union { | |
__data: struct___pthread_mutex_s, | |
__size: [40]u8, | |
__align: c_long, | |
}; | |
pub const pthread_cond_t = extern union { | |
__data: struct___pthread_cond_s, | |
__size: [48]u8, | |
__align: c_longlong, | |
}; | |
pub const pthread_rwlock_t = extern union { | |
__data: struct___pthread_rwlock_arch_t, | |
__size: [56]u8, | |
__align: c_long, | |
}; | |
pub const pthread_rwlockattr_t = extern union { | |
__size: [8]u8, | |
__align: c_long, | |
}; | |
pub const pthread_spinlock_t = c_int; | |
pub const pthread_barrier_t = extern union { | |
__size: [32]u8, | |
__align: c_long, | |
}; | |
pub const pthread_barrierattr_t = extern union { | |
__size: [4]u8, | |
__align: c_int, | |
}; | |
pub const SysIOVec = extern struct { | |
iov_base: [*c]u8, | |
iov_len: usize, | |
}; | |
pub const wchar_t = c_int; | |
pub const _Float32 = f32; | |
pub const _Float64 = f64; | |
pub const _Float32x = f64; | |
pub const _Float64x = c_longdouble; | |
pub const div_t = extern struct { | |
quot: c_int, | |
rem: c_int, | |
}; | |
pub const ldiv_t = extern struct { | |
quot: c_long, | |
rem: c_long, | |
}; | |
pub const lldiv_t = extern struct { | |
quot: c_longlong, | |
rem: c_longlong, | |
}; | |
pub extern fn __ctype_get_mb_cur_max() usize; | |
pub extern fn atof(__nptr: [*c]const u8) f64; | |
pub extern fn atoi(__nptr: [*c]const u8) c_int; | |
pub extern fn atol(__nptr: [*c]const u8) c_long; | |
pub extern fn atoll(__nptr: [*c]const u8) c_longlong; | |
pub extern fn strtod(__nptr: [*c]const u8, __endptr: [*c]([*c]u8)) f64; | |
pub extern fn strtof(__nptr: [*c]const u8, __endptr: [*c]([*c]u8)) f32; | |
pub extern fn strtold(__nptr: [*c]const u8, __endptr: [*c]([*c]u8)) c_longdouble; | |
pub extern fn strtol(__nptr: [*c]const u8, __endptr: [*c]([*c]u8), __base: c_int) c_long; | |
pub extern fn strtoul(__nptr: [*c]const u8, __endptr: [*c]([*c]u8), __base: c_int) c_ulong; | |
pub extern fn strtoq(noalias __nptr: [*c]const u8, noalias __endptr: [*c]([*c]u8), __base: c_int) c_longlong; | |
pub extern fn strtouq(noalias __nptr: [*c]const u8, noalias __endptr: [*c]([*c]u8), __base: c_int) c_ulonglong; | |
pub extern fn strtoll(__nptr: [*c]const u8, __endptr: [*c]([*c]u8), __base: c_int) c_longlong; | |
pub extern fn strtoull(__nptr: [*c]const u8, __endptr: [*c]([*c]u8), __base: c_int) c_ulonglong; | |
pub extern fn l64a(__n: c_long) [*c]u8; | |
pub extern fn a64l(__s: [*c]const u8) c_long; | |
pub extern fn random() c_long; | |
pub extern fn srandom(__seed: c_uint) void; | |
pub extern fn initstate(__seed: c_uint, __statebuf: [*c]u8, __statelen: usize) [*c]u8; | |
pub extern fn setstate(__statebuf: [*c]u8) [*c]u8; | |
pub const struct_random_data = extern struct { | |
fptr: [*c]i32, | |
rptr: [*c]i32, | |
state: [*c]i32, | |
rand_type: c_int, | |
rand_deg: c_int, | |
rand_sep: c_int, | |
end_ptr: [*c]i32, | |
}; | |
pub extern fn random_r(noalias __buf: [*c]struct_random_data, noalias __result: [*c]i32) c_int; | |
pub extern fn srandom_r(__seed: c_uint, __buf: [*c]struct_random_data) c_int; | |
pub extern fn initstate_r(__seed: c_uint, noalias __statebuf: [*c]u8, __statelen: usize, noalias __buf: [*c]struct_random_data) c_int; | |
pub extern fn setstate_r(noalias __statebuf: [*c]u8, noalias __buf: [*c]struct_random_data) c_int; | |
pub extern fn rand() c_int; | |
pub extern fn srand(__seed: c_uint) void; | |
pub extern fn rand_r(__seed: [*c]c_uint) c_int; | |
pub extern fn drand48() f64; | |
pub extern fn erand48(__xsubi: [*c]c_ushort) f64; | |
pub extern fn lrand48() c_long; | |
pub extern fn nrand48(__xsubi: [*c]c_ushort) c_long; | |
pub extern fn mrand48() c_long; | |
pub extern fn jrand48(__xsubi: [*c]c_ushort) c_long; | |
pub extern fn srand48(__seedval: c_long) void; | |
pub extern fn seed48(__seed16v: [*c]c_ushort) [*c]c_ushort; | |
pub extern fn lcong48(__param: [*c]c_ushort) void; | |
pub const struct_drand48_data = extern struct { | |
__x: [3]c_ushort, | |
__old_x: [3]c_ushort, | |
__c: c_ushort, | |
__init: c_ushort, | |
__a: c_ulonglong, | |
}; | |
pub extern fn drand48_r(noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]f64) c_int; | |
pub extern fn erand48_r(__xsubi: [*c]c_ushort, noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]f64) c_int; | |
pub extern fn lrand48_r(noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]c_long) c_int; | |
pub extern fn nrand48_r(__xsubi: [*c]c_ushort, noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]c_long) c_int; | |
pub extern fn mrand48_r(noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]c_long) c_int; | |
pub extern fn jrand48_r(__xsubi: [*c]c_ushort, noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]c_long) c_int; | |
pub extern fn srand48_r(__seedval: c_long, __buffer: [*c]struct_drand48_data) c_int; | |
pub extern fn seed48_r(__seed16v: [*c]c_ushort, __buffer: [*c]struct_drand48_data) c_int; | |
pub extern fn lcong48_r(__param: [*c]c_ushort, __buffer: [*c]struct_drand48_data) c_int; | |
pub extern fn malloc(__size: c_ulong) ?*c_void; | |
pub extern fn calloc(__nmemb: c_ulong, __size: c_ulong) ?*c_void; | |
pub extern fn realloc(__ptr: ?*c_void, __size: c_ulong) ?*c_void; | |
pub extern fn reallocarray(__ptr: ?*c_void, __nmemb: usize, __size: usize) ?*c_void; | |
pub extern fn free(__ptr: ?*c_void) void; | |
pub extern fn alloca(__size: c_ulong) ?*c_void; | |
pub extern fn valloc(__size: usize) ?*c_void; | |
pub extern fn posix_memalign(__memptr: [*c](?*c_void), __alignment: usize, __size: usize) c_int; | |
pub extern fn aligned_alloc(__alignment: usize, __size: usize) ?*c_void; | |
pub extern fn abort() noreturn; | |
pub extern fn atexit(__func: ?extern fn () void) c_int; | |
pub extern fn at_quick_exit(__func: ?extern fn () void) c_int; | |
pub extern fn on_exit(__func: ?extern fn (c_int, ?*c_void) void, __arg: ?*c_void) c_int; | |
pub extern fn exit(__status: c_int) noreturn; | |
pub extern fn quick_exit(__status: c_int) noreturn; | |
pub extern fn _Exit(__status: c_int) noreturn; | |
pub extern fn getenv(__name: [*c]const u8) [*c]u8; | |
pub extern fn putenv(__string: [*c]u8) c_int; | |
pub extern fn setenv(__name: [*c]const u8, __value: [*c]const u8, __replace: c_int) c_int; | |
pub extern fn unsetenv(__name: [*c]const u8) c_int; | |
pub extern fn clearenv() c_int; | |
pub extern fn mktemp(__template: [*c]u8) [*c]u8; | |
pub extern fn mkstemp(__template: [*c]u8) c_int; | |
pub extern fn mkstemps(__template: [*c]u8, __suffixlen: c_int) c_int; | |
pub extern fn mkdtemp(__template: [*c]u8) [*c]u8; | |
pub extern fn system(__command: [*c]const u8) c_int; | |
pub extern fn realpath(noalias __name: [*c]const u8, noalias __resolved: [*c]u8) [*c]u8; | |
pub const __compar_fn_t = ?extern fn (?*const c_void, ?*const c_void) c_int; | |
pub extern fn bsearch(__key: ?*const c_void, __base: ?*const c_void, __nmemb: usize, __size: usize, __compar: __compar_fn_t) ?*c_void; | |
pub extern fn qsort(__base: ?*c_void, __nmemb: usize, __size: usize, __compar: __compar_fn_t) void; | |
pub extern fn abs(__x: c_int) c_int; | |
pub extern fn labs(__x: c_long) c_long; | |
pub extern fn llabs(__x: c_longlong) c_longlong; | |
pub extern fn div(__numer: c_int, __denom: c_int) div_t; | |
pub extern fn ldiv(__numer: c_long, __denom: c_long) ldiv_t; | |
pub extern fn lldiv(__numer: c_longlong, __denom: c_longlong) lldiv_t; | |
pub extern fn ecvt(__value: f64, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int) [*c]u8; | |
pub extern fn fcvt(__value: f64, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int) [*c]u8; | |
pub extern fn gcvt(__value: f64, __ndigit: c_int, __buf: [*c]u8) [*c]u8; | |
pub extern fn qecvt(__value: c_longdouble, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int) [*c]u8; | |
pub extern fn qfcvt(__value: c_longdouble, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int) [*c]u8; | |
pub extern fn qgcvt(__value: c_longdouble, __ndigit: c_int, __buf: [*c]u8) [*c]u8; | |
pub extern fn ecvt_r(__value: f64, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int, noalias __buf: [*c]u8, __len: usize) c_int; | |
pub extern fn fcvt_r(__value: f64, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int, noalias __buf: [*c]u8, __len: usize) c_int; | |
pub extern fn qecvt_r(__value: c_longdouble, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int, noalias __buf: [*c]u8, __len: usize) c_int; | |
pub extern fn qfcvt_r(__value: c_longdouble, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int, noalias __buf: [*c]u8, __len: usize) c_int; | |
pub extern fn mblen(__s: [*c]const u8, __n: usize) c_int; | |
pub extern fn mbtowc(noalias __pwc: [*c]wchar_t, noalias __s: [*c]const u8, __n: usize) c_int; | |
pub extern fn wctomb(__s: [*c]u8, __wchar: wchar_t) c_int; | |
pub extern fn mbstowcs(noalias __pwcs: [*c]wchar_t, noalias __s: [*c]const u8, __n: usize) usize; | |
pub extern fn wcstombs(noalias __s: [*c]u8, noalias __pwcs: [*c]const wchar_t, __n: usize) usize; | |
pub extern fn rpmatch(__response: [*c]const u8) c_int; | |
pub extern fn getsubopt(noalias __optionp: [*c]([*c]u8), noalias __tokens: [*c]const ([*c]u8), noalias __valuep: [*c]([*c]u8)) c_int; | |
pub extern fn getloadavg(__loadavg: [*c]f64, __nelem: c_int) c_int; | |
pub const struct___va_list_tag = extern struct { | |
gp_offset: c_uint, | |
fp_offset: c_uint, | |
overflow_arg_area: ?*c_void, | |
reg_save_area: ?*c_void, | |
}; | |
pub const __builtin_va_list = [1]struct___va_list_tag; | |
pub const va_list = __builtin_va_list; | |
pub const __gnuc_va_list = __builtin_va_list; | |
pub const __mbstate_t = extern struct { | |
__count: c_int, | |
__value: extern union { | |
__wch: c_uint, | |
__wchb: [4]u8, | |
}, | |
}; | |
pub const struct__G_fpos_t = extern struct { | |
__pos: __off_t, | |
__state: __mbstate_t, | |
}; | |
pub const __fpos_t = struct__G_fpos_t; | |
pub const struct__G_fpos64_t = extern struct { | |
__pos: __off64_t, | |
__state: __mbstate_t, | |
}; | |
pub const __fpos64_t = struct__G_fpos64_t; | |
pub const struct__IO_marker = @OpaqueType(); | |
pub const _IO_lock_t = c_void; | |
pub const struct__IO_codecvt = @OpaqueType(); | |
pub const struct__IO_wide_data = @OpaqueType(); | |
pub const struct__IO_FILE = extern struct { | |
_flags: c_int, | |
_IO_read_ptr: [*c]u8, | |
_IO_read_end: [*c]u8, | |
_IO_read_base: [*c]u8, | |
_IO_write_base: [*c]u8, | |
_IO_write_ptr: [*c]u8, | |
_IO_write_end: [*c]u8, | |
_IO_buf_base: [*c]u8, | |
_IO_buf_end: [*c]u8, | |
_IO_save_base: [*c]u8, | |
_IO_backup_base: [*c]u8, | |
_IO_save_end: [*c]u8, | |
_markers: ?*struct__IO_marker, | |
_chain: [*c]struct__IO_FILE, | |
_fileno: c_int, | |
_flags2: c_int, | |
_old_offset: __off_t, | |
_cur_column: c_ushort, | |
_vtable_offset: i8, | |
_shortbuf: [1]u8, | |
_lock: ?*_IO_lock_t, | |
_offset: __off64_t, | |
_codecvt: ?*struct__IO_codecvt, | |
_wide_data: ?*struct__IO_wide_data, | |
_freeres_list: [*c]struct__IO_FILE, | |
_freeres_buf: ?*c_void, | |
__pad5: usize, | |
_mode: c_int, | |
_unused2: [20]u8, | |
}; | |
pub const __FILE = struct__IO_FILE; | |
pub const FILE = struct__IO_FILE; | |
pub const fpos_t = __fpos_t; | |
pub extern var stdin: [*c]FILE; | |
pub extern var stdout: [*c]FILE; | |
pub extern var stderr: [*c]FILE; | |
pub extern fn remove(__filename: [*c]const u8) c_int; | |
pub extern fn rename(__old: [*c]const u8, __new: [*c]const u8) c_int; | |
pub extern fn renameat(__oldfd: c_int, __old: [*c]const u8, __newfd: c_int, __new: [*c]const u8) c_int; | |
pub extern fn tmpfile() [*c]FILE; | |
pub extern fn tmpnam(__s: [*c]u8) [*c]u8; | |
pub extern fn tmpnam_r(__s: [*c]u8) [*c]u8; | |
pub extern fn tempnam(__dir: [*c]const u8, __pfx: [*c]const u8) [*c]u8; | |
pub extern fn fclose(__stream: [*c]FILE) c_int; | |
pub extern fn fflush(__stream: [*c]FILE) c_int; | |
pub extern fn fflush_unlocked(__stream: [*c]FILE) c_int; | |
pub extern fn fopen(__filename: [*c]const u8, __modes: [*c]const u8) [*c]FILE; | |
pub extern fn freopen(noalias __filename: [*c]const u8, noalias __modes: [*c]const u8, noalias __stream: [*c]FILE) [*c]FILE; | |
pub extern fn fdopen(__fd: c_int, __modes: [*c]const u8) [*c]FILE; | |
pub extern fn fmemopen(__s: ?*c_void, __len: usize, __modes: [*c]const u8) [*c]FILE; | |
pub extern fn open_memstream(__bufloc: [*c]([*c]u8), __sizeloc: [*c]usize) [*c]FILE; | |
pub extern fn setbuf(noalias __stream: [*c]FILE, noalias __buf: [*c]u8) void; | |
pub extern fn setvbuf(noalias __stream: [*c]FILE, noalias __buf: [*c]u8, __modes: c_int, __n: usize) c_int; | |
pub extern fn setbuffer(noalias __stream: [*c]FILE, noalias __buf: [*c]u8, __size: usize) void; | |
pub extern fn setlinebuf(__stream: [*c]FILE) void; | |
pub extern fn fprintf(__stream: [*c]FILE, __format: [*c]const u8, ...) c_int; | |
pub extern fn printf(__format: [*c]const u8, ...) c_int; | |
pub extern fn sprintf(__s: [*c]u8, __format: [*c]const u8, ...) c_int; | |
pub extern fn vfprintf(__s: [*c]FILE, __format: [*c]const u8, __arg: [*c]struct___va_list_tag) c_int; | |
pub extern fn vprintf(__format: [*c]const u8, __arg: [*c]struct___va_list_tag) c_int; | |
pub extern fn vsprintf(__s: [*c]u8, __format: [*c]const u8, __arg: [*c]struct___va_list_tag) c_int; | |
pub extern fn snprintf(__s: [*c]u8, __maxlen: c_ulong, __format: [*c]const u8, ...) c_int; | |
pub extern fn vsnprintf(__s: [*c]u8, __maxlen: c_ulong, __format: [*c]const u8, __arg: [*c]struct___va_list_tag) c_int; | |
pub extern fn vdprintf(__fd: c_int, noalias __fmt: [*c]const u8, __arg: [*c]struct___va_list_tag) c_int; | |
pub extern fn dprintf(__fd: c_int, noalias __fmt: [*c]const u8, ...) c_int; | |
pub extern fn fscanf(noalias __stream: [*c]FILE, noalias __format: [*c]const u8, ...) c_int; | |
pub extern fn scanf(noalias __format: [*c]const u8, ...) c_int; | |
pub extern fn sscanf(noalias __s: [*c]const u8, noalias __format: [*c]const u8, ...) c_int; | |
pub extern fn vfscanf(noalias __s: [*c]FILE, noalias __format: [*c]const u8, __arg: [*c]struct___va_list_tag) c_int; | |
pub extern fn vscanf(noalias __format: [*c]const u8, __arg: [*c]struct___va_list_tag) c_int; | |
pub extern fn vsscanf(noalias __s: [*c]const u8, noalias __format: [*c]const u8, __arg: [*c]struct___va_list_tag) c_int; | |
pub extern fn fgetc(__stream: [*c]FILE) c_int; | |
pub extern fn getc(__stream: [*c]FILE) c_int; | |
pub extern fn getchar() c_int; | |
pub extern fn getc_unlocked(__stream: [*c]FILE) c_int; | |
pub extern fn getchar_unlocked() c_int; | |
pub extern fn fgetc_unlocked(__stream: [*c]FILE) c_int; | |
pub extern fn fputc(__c: c_int, __stream: [*c]FILE) c_int; | |
pub extern fn putc(__c: c_int, __stream: [*c]FILE) c_int; | |
pub extern fn putchar(__c: c_int) c_int; | |
pub extern fn fputc_unlocked(__c: c_int, __stream: [*c]FILE) c_int; | |
pub extern fn putc_unlocked(__c: c_int, __stream: [*c]FILE) c_int; | |
pub extern fn putchar_unlocked(__c: c_int) c_int; | |
pub extern fn getw(__stream: [*c]FILE) c_int; | |
pub extern fn putw(__w: c_int, __stream: [*c]FILE) c_int; | |
pub extern fn fgets(noalias __s: [*c]u8, __n: c_int, noalias __stream: [*c]FILE) [*c]u8; | |
pub extern fn __getdelim(noalias __lineptr: [*c]([*c]u8), noalias __n: [*c]usize, __delimiter: c_int, noalias __stream: [*c]FILE) __ssize_t; | |
pub extern fn getdelim(noalias __lineptr: [*c]([*c]u8), noalias __n: [*c]usize, __delimiter: c_int, noalias __stream: [*c]FILE) __ssize_t; | |
pub extern fn getline(noalias __lineptr: [*c]([*c]u8), noalias __n: [*c]usize, noalias __stream: [*c]FILE) __ssize_t; | |
pub extern fn fputs(noalias __s: [*c]const u8, noalias __stream: [*c]FILE) c_int; | |
pub extern fn puts(__s: [*c]const u8) c_int; | |
pub extern fn ungetc(__c: c_int, __stream: [*c]FILE) c_int; | |
pub extern fn fread(__ptr: ?*c_void, __size: c_ulong, __n: c_ulong, __stream: [*c]FILE) c_ulong; | |
pub extern fn fwrite(__ptr: ?*const c_void, __size: c_ulong, __n: c_ulong, __s: [*c]FILE) c_ulong; | |
pub extern fn fread_unlocked(noalias __ptr: ?*c_void, __size: usize, __n: usize, noalias __stream: [*c]FILE) usize; | |
pub extern fn fwrite_unlocked(noalias __ptr: ?*const c_void, __size: usize, __n: usize, noalias __stream: [*c]FILE) usize; | |
pub extern fn fseek(__stream: [*c]FILE, __off: c_long, __whence: c_int) c_int; | |
pub extern fn ftell(__stream: [*c]FILE) c_long; | |
pub extern fn rewind(__stream: [*c]FILE) void; | |
pub extern fn fseeko(__stream: [*c]FILE, __off: __off_t, __whence: c_int) c_int; | |
pub extern fn ftello(__stream: [*c]FILE) __off_t; | |
pub extern fn fgetpos(noalias __stream: [*c]FILE, noalias __pos: [*c]fpos_t) c_int; | |
pub extern fn fsetpos(__stream: [*c]FILE, __pos: [*c]const fpos_t) c_int; | |
pub extern fn clearerr(__stream: [*c]FILE) void; | |
pub extern fn feof(__stream: [*c]FILE) c_int; | |
pub extern fn ferror(__stream: [*c]FILE) c_int; | |
pub extern fn clearerr_unlocked(__stream: [*c]FILE) void; | |
pub extern fn feof_unlocked(__stream: [*c]FILE) c_int; | |
pub extern fn ferror_unlocked(__stream: [*c]FILE) c_int; | |
pub extern fn perror(__s: [*c]const u8) void; | |
pub extern var sys_nerr: c_int; | |
pub extern const sys_errlist: [*c]const ([*c]const u8); | |
pub extern fn fileno(__stream: [*c]FILE) c_int; | |
pub extern fn fileno_unlocked(__stream: [*c]FILE) c_int; | |
pub extern fn popen(__command: [*c]const u8, __modes: [*c]const u8) [*c]FILE; | |
pub extern fn pclose(__stream: [*c]FILE) c_int; | |
pub extern fn ctermid(__s: [*c]u8) [*c]u8; | |
pub extern fn flockfile(__stream: [*c]FILE) void; | |
pub extern fn ftrylockfile(__stream: [*c]FILE) c_int; | |
pub extern fn funlockfile(__stream: [*c]FILE) void; | |
pub extern fn __uflow(arg0: [*c]FILE) c_int; | |
pub extern fn __overflow(arg0: [*c]FILE, arg1: c_int) c_int; | |
pub const ErlNifUInt64 = ErlNapiUInt64; | |
pub const ErlNifSInt64 = ErlNapiSInt64; | |
pub const ErlNifUInt = ErlNapiUInt; | |
pub const ErlNifSInt = ErlNapiSInt; | |
pub const ERL_NIF_TERM = ErlNifUInt; | |
pub const ERL_NIF_UINT = ERL_NIF_TERM; | |
pub const ErlNifTime = ErlNifSInt64; | |
pub const ERL_NIF_SEC = 0; | |
pub const ERL_NIF_MSEC = 1; | |
pub const ERL_NIF_USEC = 2; | |
pub const ERL_NIF_NSEC = 3; | |
pub const ErlNifTimeUnit = extern enum { | |
ERL_NIF_SEC = 0, | |
ERL_NIF_MSEC = 1, | |
ERL_NIF_USEC = 2, | |
ERL_NIF_NSEC = 3, | |
}; | |
pub const struct_enif_environment_t = @OpaqueType(); | |
pub const ErlNifEnv = struct_enif_environment_t; | |
pub const struct_enif_func_t = extern struct { | |
name: [*c]const u8, | |
arity: c_uint, | |
fptr: ?extern fn (?*ErlNifEnv, c_int, [*c]const ERL_NIF_TERM) ERL_NIF_TERM, | |
flags: c_uint, | |
}; | |
pub const ErlNifFunc = struct_enif_func_t; | |
pub const struct_enif_entry_t = extern struct { | |
major: c_int, | |
minor: c_int, | |
name: [*c]const u8, | |
num_of_funcs: c_int, | |
funcs: [*c]ErlNifFunc, | |
load: ?extern fn (?*ErlNifEnv, [*c](?*c_void), ERL_NIF_TERM) c_int, | |
reload: ?extern fn (?*ErlNifEnv, [*c](?*c_void), ERL_NIF_TERM) c_int, | |
upgrade: ?extern fn (?*ErlNifEnv, [*c](?*c_void), [*c](?*c_void), ERL_NIF_TERM) c_int, | |
unload: ?extern fn (?*ErlNifEnv, ?*c_void) void, | |
vm_variant: [*c]const u8, | |
options: c_uint, | |
sizeof_ErlNifResourceTypeInit: usize, | |
min_erts: [*c]const u8, | |
}; | |
pub const ErlNifEntry = struct_enif_entry_t; | |
pub const ErlNifBinary = extern struct { | |
size: usize, | |
data: [*c]u8, | |
ref_bin: ?*c_void, | |
__spare__: [2](?*c_void), | |
}; | |
pub const ErlNifEvent = c_int; | |
pub const ERL_NIF_RT_CREATE = 1; | |
pub const ERL_NIF_RT_TAKEOVER = 2; | |
pub const ErlNifResourceFlags = extern enum { | |
ERL_NIF_RT_CREATE = 1, | |
ERL_NIF_RT_TAKEOVER = 2, | |
}; | |
pub const ERL_NIF_LATIN1 = 1; | |
pub const ErlNifCharEncoding = extern enum { | |
ERL_NIF_LATIN1 = 1, | |
}; | |
pub const ErlNifPid = extern struct { | |
pid: ERL_NIF_TERM, | |
}; | |
pub const ErlNifPort = extern struct { | |
port_id: ERL_NIF_TERM, | |
}; | |
pub const ErlNifMonitor = ErlDrvMonitor; | |
pub const struct_enif_resource_type_t = @OpaqueType(); | |
pub const ErlNifResourceType = struct_enif_resource_type_t; | |
pub const ErlNifResourceDtor = extern fn (?*ErlNifEnv, ?*c_void) void; | |
pub const ErlNifResourceStop = extern fn (?*ErlNifEnv, ?*c_void, ErlNifEvent, c_int) void; | |
pub const ErlNifResourceDown = extern fn (?*ErlNifEnv, ?*c_void, [*c]ErlNifPid, [*c]ErlNifMonitor) void; | |
pub const ErlNifResourceTypeInit = extern struct { | |
dtor: ?ErlNifResourceDtor, | |
stop: ?ErlNifResourceStop, | |
down: ?ErlNifResourceDown, | |
}; | |
pub const ErlNifSysInfo = ErlDrvSysInfo; | |
pub const struct_ErlDrvTid_ = @OpaqueType(); | |
pub const ErlNifTid = ?*struct_ErlDrvTid_; | |
pub const struct_ErlDrvMutex_ = @OpaqueType(); | |
pub const ErlNifMutex = struct_ErlDrvMutex_; | |
pub const struct_ErlDrvCond_ = @OpaqueType(); | |
pub const ErlNifCond = struct_ErlDrvCond_; | |
pub const struct_ErlDrvRWLock_ = @OpaqueType(); | |
pub const ErlNifRWLock = struct_ErlDrvRWLock_; | |
pub const ErlNifTSDKey = c_int; | |
pub const ErlNifThreadOpts = ErlDrvThreadOpts; | |
pub const ERL_NIF_DIRTY_JOB_CPU_BOUND = 1; | |
pub const ERL_NIF_DIRTY_JOB_IO_BOUND = 2; | |
pub const ErlNifDirtyTaskFlags = extern enum { | |
ERL_NIF_DIRTY_JOB_CPU_BOUND = 1, | |
ERL_NIF_DIRTY_JOB_IO_BOUND = 2, | |
}; | |
pub const struct_ErtsDynamicWStack_ = @OpaqueType(); | |
pub const ErlNifMapIterator = extern struct { | |
map: ERL_NIF_TERM, | |
size: ERL_NIF_UINT, | |
idx: ERL_NIF_UINT, | |
u: extern union { | |
flat: extern struct { | |
ks: [*c]ERL_NIF_TERM, | |
vs: [*c]ERL_NIF_TERM, | |
}, | |
hash: extern struct { | |
wstack: ?*struct_ErtsDynamicWStack_, | |
kv: [*c]ERL_NIF_TERM, | |
}, | |
}, | |
__spare__: [2](?*c_void), | |
}; | |
pub const ERL_NIF_MAP_ITERATOR_FIRST = 1; | |
pub const ERL_NIF_MAP_ITERATOR_LAST = 2; | |
pub const ERL_NIF_MAP_ITERATOR_HEAD = 1; | |
pub const ERL_NIF_MAP_ITERATOR_TAIL = 2; | |
pub const ErlNifMapIteratorEntry = extern enum { | |
ERL_NIF_MAP_ITERATOR_FIRST = 1, | |
ERL_NIF_MAP_ITERATOR_LAST = 2, | |
ERL_NIF_MAP_ITERATOR_HEAD = 1, | |
ERL_NIF_MAP_ITERATOR_TAIL = 2, | |
}; | |
pub const ERL_NIF_UNIQUE_POSITIVE = 1; | |
pub const ERL_NIF_UNIQUE_MONOTONIC = 2; | |
pub const ErlNifUniqueInteger = extern enum { | |
ERL_NIF_UNIQUE_POSITIVE = 1, | |
ERL_NIF_UNIQUE_MONOTONIC = 2, | |
}; | |
pub const ERL_NIF_BIN2TERM_SAFE = 536870912; | |
pub const ErlNifBinaryToTerm = extern enum { | |
ERL_NIF_BIN2TERM_SAFE = 536870912, | |
}; | |
pub const ERL_NIF_INTERNAL_HASH = 1; | |
pub const ERL_NIF_PHASH2 = 2; | |
pub const ErlNifHash = extern enum { | |
ERL_NIF_INTERNAL_HASH = 1, | |
ERL_NIF_PHASH2 = 2, | |
}; | |
pub const struct_erl_nif_io_vec = extern struct { | |
iovcnt: c_int, | |
size: usize, | |
iov: [*c]SysIOVec, | |
ref_bins: [*c](?*c_void), | |
flags: c_int, | |
small_iov: [16]SysIOVec, | |
small_ref_bin: [16](?*c_void), | |
}; | |
pub const ErlNifIOVec = struct_erl_nif_io_vec; | |
pub const struct_erts_io_queue = @OpaqueType(); | |
pub const ErlNifIOQueue = struct_erts_io_queue; | |
pub const ERL_NIF_IOQ_NORMAL = 1; | |
pub const ErlNifIOQueueOpts = extern enum { | |
ERL_NIF_IOQ_NORMAL = 1, | |
}; | |
pub const ERL_NIF_TERM_TYPE_ATOM = 1; | |
pub const ERL_NIF_TERM_TYPE_BITSTRING = 2; | |
pub const ERL_NIF_TERM_TYPE_FLOAT = 3; | |
pub const ERL_NIF_TERM_TYPE_FUN = 4; | |
pub const ERL_NIF_TERM_TYPE_INTEGER = 5; | |
pub const ERL_NIF_TERM_TYPE_LIST = 6; | |
pub const ERL_NIF_TERM_TYPE_MAP = 7; | |
pub const ERL_NIF_TERM_TYPE_PID = 8; | |
pub const ERL_NIF_TERM_TYPE_PORT = 9; | |
pub const ERL_NIF_TERM_TYPE_REFERENCE = 10; | |
pub const ERL_NIF_TERM_TYPE_TUPLE = 11; | |
pub const ERL_NIF_TERM_TYPE__MISSING_DEFAULT_CASE__READ_THE_MANUAL = -1; | |
pub const ErlNifTermType = extern enum { | |
ERL_NIF_TERM_TYPE_ATOM = 1, | |
ERL_NIF_TERM_TYPE_BITSTRING = 2, | |
ERL_NIF_TERM_TYPE_FLOAT = 3, | |
ERL_NIF_TERM_TYPE_FUN = 4, | |
ERL_NIF_TERM_TYPE_INTEGER = 5, | |
ERL_NIF_TERM_TYPE_LIST = 6, | |
ERL_NIF_TERM_TYPE_MAP = 7, | |
ERL_NIF_TERM_TYPE_PID = 8, | |
ERL_NIF_TERM_TYPE_PORT = 9, | |
ERL_NIF_TERM_TYPE_REFERENCE = 10, | |
ERL_NIF_TERM_TYPE_TUPLE = 11, | |
ERL_NIF_TERM_TYPE__MISSING_DEFAULT_CASE__READ_THE_MANUAL = -1, | |
}; | |
pub extern fn enif_priv_data(arg0: ?*ErlNifEnv) ?*c_void; | |
pub extern fn enif_alloc(size: usize) ?*c_void; | |
pub extern fn enif_free(ptr: ?*c_void) void; | |
pub extern fn enif_is_atom(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_is_binary(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_is_ref(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_inspect_binary(arg0: ?*ErlNifEnv, bin_term: ERL_NIF_TERM, bin: [*c]ErlNifBinary) c_int; | |
pub extern fn enif_alloc_binary(size: usize, bin: [*c]ErlNifBinary) c_int; | |
pub extern fn enif_realloc_binary(bin: [*c]ErlNifBinary, size: usize) c_int; | |
pub extern fn enif_release_binary(bin: [*c]ErlNifBinary) void; | |
pub extern fn enif_get_int(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM, ip: [*c]c_int) c_int; | |
pub extern fn enif_get_ulong(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM, ip: [*c]c_ulong) c_int; | |
pub extern fn enif_get_double(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM, dp: [*c]f64) c_int; | |
pub extern fn enif_get_list_cell(env: ?*ErlNifEnv, term: ERL_NIF_TERM, head: [*c]ERL_NIF_TERM, tail: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_get_tuple(env: ?*ErlNifEnv, tpl: ERL_NIF_TERM, arity: [*c]c_int, array: [*c]([*c]const ERL_NIF_TERM)) c_int; | |
pub extern fn enif_is_identical(lhs: ERL_NIF_TERM, rhs: ERL_NIF_TERM) c_int; | |
pub extern fn enif_compare(lhs: ERL_NIF_TERM, rhs: ERL_NIF_TERM) c_int; | |
pub extern fn enif_make_binary(env: ?*ErlNifEnv, bin: [*c]ErlNifBinary) ERL_NIF_TERM; | |
pub extern fn enif_make_badarg(env: ?*ErlNifEnv) ERL_NIF_TERM; | |
pub extern fn enif_make_int(env: ?*ErlNifEnv, i: c_int) ERL_NIF_TERM; | |
pub extern fn enif_make_ulong(env: ?*ErlNifEnv, i: c_ulong) ERL_NIF_TERM; | |
pub extern fn enif_make_double(env: ?*ErlNifEnv, d: f64) ERL_NIF_TERM; | |
pub extern fn enif_make_atom(env: ?*ErlNifEnv, name: [*c]const u8) ERL_NIF_TERM; | |
pub extern fn enif_make_existing_atom(env: ?*ErlNifEnv, name: [*c]const u8, atom: [*c]ERL_NIF_TERM, arg3: ErlNifCharEncoding) c_int; | |
pub extern fn enif_make_tuple(env: ?*ErlNifEnv, cnt: c_uint, ...) ERL_NIF_TERM; | |
pub extern fn enif_make_list(env: ?*ErlNifEnv, cnt: c_uint, ...) ERL_NIF_TERM; | |
pub extern fn enif_make_list_cell(env: ?*ErlNifEnv, car: ERL_NIF_TERM, cdr: ERL_NIF_TERM) ERL_NIF_TERM; | |
pub extern fn enif_make_string(env: ?*ErlNifEnv, string: [*c]const u8, arg2: ErlNifCharEncoding) ERL_NIF_TERM; | |
pub extern fn enif_make_ref(env: ?*ErlNifEnv) ERL_NIF_TERM; | |
pub extern fn enif_mutex_create(name: [*c]u8) ?*ErlNifMutex; | |
pub extern fn enif_mutex_destroy(mtx: ?*ErlNifMutex) void; | |
pub extern fn enif_mutex_trylock(mtx: ?*ErlNifMutex) c_int; | |
pub extern fn enif_mutex_lock(mtx: ?*ErlNifMutex) void; | |
pub extern fn enif_mutex_unlock(mtx: ?*ErlNifMutex) void; | |
pub extern fn enif_cond_create(name: [*c]u8) ?*ErlNifCond; | |
pub extern fn enif_cond_destroy(cnd: ?*ErlNifCond) void; | |
pub extern fn enif_cond_signal(cnd: ?*ErlNifCond) void; | |
pub extern fn enif_cond_broadcast(cnd: ?*ErlNifCond) void; | |
pub extern fn enif_cond_wait(cnd: ?*ErlNifCond, mtx: ?*ErlNifMutex) void; | |
pub extern fn enif_rwlock_create(name: [*c]u8) ?*ErlNifRWLock; | |
pub extern fn enif_rwlock_destroy(rwlck: ?*ErlNifRWLock) void; | |
pub extern fn enif_rwlock_tryrlock(rwlck: ?*ErlNifRWLock) c_int; | |
pub extern fn enif_rwlock_rlock(rwlck: ?*ErlNifRWLock) void; | |
pub extern fn enif_rwlock_runlock(rwlck: ?*ErlNifRWLock) void; | |
pub extern fn enif_rwlock_tryrwlock(rwlck: ?*ErlNifRWLock) c_int; | |
pub extern fn enif_rwlock_rwlock(rwlck: ?*ErlNifRWLock) void; | |
pub extern fn enif_rwlock_rwunlock(rwlck: ?*ErlNifRWLock) void; | |
pub extern fn enif_tsd_key_create(name: [*c]u8, key: [*c]ErlNifTSDKey) c_int; | |
pub extern fn enif_tsd_key_destroy(key: ErlNifTSDKey) void; | |
pub extern fn enif_tsd_set(key: ErlNifTSDKey, data: ?*c_void) void; | |
pub extern fn enif_tsd_get(key: ErlNifTSDKey) ?*c_void; | |
pub extern fn enif_thread_opts_create(name: [*c]u8) [*c]ErlNifThreadOpts; | |
pub extern fn enif_thread_opts_destroy(opts: [*c]ErlNifThreadOpts) void; | |
pub extern fn enif_thread_create(name: [*c]u8, tid: [*c]ErlNifTid, func: ?extern fn (?*c_void) ?*c_void, args: ?*c_void, opts: [*c]ErlNifThreadOpts) c_int; | |
pub extern fn enif_thread_self() ErlNifTid; | |
pub extern fn enif_equal_tids(tid1: ErlNifTid, tid2: ErlNifTid) c_int; | |
pub extern fn enif_thread_exit(resp: ?*c_void) void; | |
pub extern fn enif_thread_join(arg0: ErlNifTid, respp: [*c](?*c_void)) c_int; | |
pub extern fn enif_realloc(ptr: ?*c_void, size: usize) ?*c_void; | |
pub extern fn enif_system_info(sip: [*c]ErlNifSysInfo, si_size: usize) void; | |
pub extern fn enif_fprintf(filep: [*c]FILE, format: [*c]const u8, ...) c_int; | |
pub extern fn enif_inspect_iolist_as_binary(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM, bin: [*c]ErlNifBinary) c_int; | |
pub extern fn enif_make_sub_binary(arg0: ?*ErlNifEnv, bin_term: ERL_NIF_TERM, pos: usize, size: usize) ERL_NIF_TERM; | |
pub extern fn enif_get_string(arg0: ?*ErlNifEnv, list: ERL_NIF_TERM, buf: [*c]u8, len: c_uint, arg4: ErlNifCharEncoding) c_int; | |
pub extern fn enif_get_atom(arg0: ?*ErlNifEnv, atom: ERL_NIF_TERM, buf: [*c]u8, len: c_uint, arg4: ErlNifCharEncoding) c_int; | |
pub extern fn enif_is_fun(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_is_pid(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_is_port(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_get_uint(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM, ip: [*c]c_uint) c_int; | |
pub extern fn enif_get_long(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM, ip: [*c]c_long) c_int; | |
pub extern fn enif_make_uint(arg0: ?*ErlNifEnv, i: c_uint) ERL_NIF_TERM; | |
pub extern fn enif_make_long(arg0: ?*ErlNifEnv, i: c_long) ERL_NIF_TERM; | |
pub extern fn enif_make_tuple_from_array(arg0: ?*ErlNifEnv, arr: [*c]const ERL_NIF_TERM, cnt: c_uint) ERL_NIF_TERM; | |
pub extern fn enif_make_list_from_array(arg0: ?*ErlNifEnv, arr: [*c]const ERL_NIF_TERM, cnt: c_uint) ERL_NIF_TERM; | |
pub extern fn enif_is_empty_list(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_open_resource_type(arg0: ?*ErlNifEnv, module_str: [*c]const u8, name_str: [*c]const u8, dtor: ?extern fn (?*ErlNifEnv, ?*c_void) void, flags: ErlNifResourceFlags, tried: [*c]ErlNifResourceFlags) ?*ErlNifResourceType; | |
pub extern fn enif_alloc_resource(type_0: ?*ErlNifResourceType, size: usize) ?*c_void; | |
pub extern fn enif_release_resource(obj: ?*c_void) void; | |
pub extern fn enif_make_resource(arg0: ?*ErlNifEnv, obj: ?*c_void) ERL_NIF_TERM; | |
pub extern fn enif_get_resource(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM, type_0: ?*ErlNifResourceType, objp: [*c](?*c_void)) c_int; | |
pub extern fn enif_sizeof_resource(obj: ?*c_void) usize; | |
pub extern fn enif_make_new_binary(arg0: ?*ErlNifEnv, size: usize, termp: [*c]ERL_NIF_TERM) [*c]u8; | |
pub extern fn enif_is_list(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_is_tuple(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_get_atom_length(arg0: ?*ErlNifEnv, atom: ERL_NIF_TERM, len: [*c]c_uint, arg3: ErlNifCharEncoding) c_int; | |
pub extern fn enif_get_list_length(env: ?*ErlNifEnv, term: ERL_NIF_TERM, len: [*c]c_uint) c_int; | |
pub extern fn enif_make_atom_len(env: ?*ErlNifEnv, name: [*c]const u8, len: usize) ERL_NIF_TERM; | |
pub extern fn enif_make_existing_atom_len(env: ?*ErlNifEnv, name: [*c]const u8, len: usize, atom: [*c]ERL_NIF_TERM, arg4: ErlNifCharEncoding) c_int; | |
pub extern fn enif_make_string_len(env: ?*ErlNifEnv, string: [*c]const u8, len: usize, arg3: ErlNifCharEncoding) ERL_NIF_TERM; | |
pub extern fn enif_alloc_env() ?*ErlNifEnv; | |
pub extern fn enif_free_env(env: ?*ErlNifEnv) void; | |
pub extern fn enif_clear_env(env: ?*ErlNifEnv) void; | |
pub extern fn enif_send(env: ?*ErlNifEnv, to_pid: [*c]const ErlNifPid, msg_env: ?*ErlNifEnv, msg: ERL_NIF_TERM) c_int; | |
pub extern fn enif_make_copy(dst_env: ?*ErlNifEnv, src_term: ERL_NIF_TERM) ERL_NIF_TERM; | |
pub extern fn enif_self(caller_env: ?*ErlNifEnv, pid: [*c]ErlNifPid) [*c]ErlNifPid; | |
pub extern fn enif_get_local_pid(env: ?*ErlNifEnv, arg1: ERL_NIF_TERM, pid: [*c]ErlNifPid) c_int; | |
pub extern fn enif_keep_resource(obj: ?*c_void) void; | |
pub extern fn enif_make_resource_binary(arg0: ?*ErlNifEnv, obj: ?*c_void, data: ?*const c_void, size: usize) ERL_NIF_TERM; | |
pub extern fn enif_is_exception(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_make_reverse_list(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM, list: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_is_number(arg0: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_dlopen(lib: [*c]const u8, err_handler: ?extern fn (?*c_void, [*c]const u8) void, err_arg: ?*c_void) ?*c_void; | |
pub extern fn enif_dlsym(handle: ?*c_void, symbol: [*c]const u8, err_handler: ?extern fn (?*c_void, [*c]const u8) void, err_arg: ?*c_void) ?*c_void; | |
pub extern fn enif_consume_timeslice(arg0: ?*ErlNifEnv, percent: c_int) c_int; | |
pub extern fn enif_is_map(env: ?*ErlNifEnv, term: ERL_NIF_TERM) c_int; | |
pub extern fn enif_get_map_size(env: ?*ErlNifEnv, term: ERL_NIF_TERM, size: [*c]usize) c_int; | |
pub extern fn enif_make_new_map(env: ?*ErlNifEnv) ERL_NIF_TERM; | |
pub extern fn enif_make_map_put(env: ?*ErlNifEnv, map_in: ERL_NIF_TERM, key: ERL_NIF_TERM, value: ERL_NIF_TERM, map_out: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_get_map_value(env: ?*ErlNifEnv, map: ERL_NIF_TERM, key: ERL_NIF_TERM, value: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_make_map_update(env: ?*ErlNifEnv, map_in: ERL_NIF_TERM, key: ERL_NIF_TERM, value: ERL_NIF_TERM, map_out: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_make_map_remove(env: ?*ErlNifEnv, map_in: ERL_NIF_TERM, key: ERL_NIF_TERM, map_out: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_map_iterator_create(env: ?*ErlNifEnv, map: ERL_NIF_TERM, iter: [*c]ErlNifMapIterator, entry: ErlNifMapIteratorEntry) c_int; | |
pub extern fn enif_map_iterator_destroy(env: ?*ErlNifEnv, iter: [*c]ErlNifMapIterator) void; | |
pub extern fn enif_map_iterator_is_head(env: ?*ErlNifEnv, iter: [*c]ErlNifMapIterator) c_int; | |
pub extern fn enif_map_iterator_is_tail(env: ?*ErlNifEnv, iter: [*c]ErlNifMapIterator) c_int; | |
pub extern fn enif_map_iterator_next(env: ?*ErlNifEnv, iter: [*c]ErlNifMapIterator) c_int; | |
pub extern fn enif_map_iterator_prev(env: ?*ErlNifEnv, iter: [*c]ErlNifMapIterator) c_int; | |
pub extern fn enif_map_iterator_get_pair(env: ?*ErlNifEnv, iter: [*c]ErlNifMapIterator, key: [*c]ERL_NIF_TERM, value: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_schedule_nif(arg0: ?*ErlNifEnv, arg1: [*c]const u8, arg2: c_int, arg3: ?extern fn (?*ErlNifEnv, c_int, [*c]const ERL_NIF_TERM) ERL_NIF_TERM, arg4: c_int, arg5: [*c]const ERL_NIF_TERM) ERL_NIF_TERM; | |
pub extern fn enif_has_pending_exception(env: ?*ErlNifEnv, reason: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_raise_exception(env: ?*ErlNifEnv, reason: ERL_NIF_TERM) ERL_NIF_TERM; | |
pub extern fn enif_getenv(key: [*c]const u8, value: [*c]u8, value_size: [*c]usize) c_int; | |
pub extern fn enif_monotonic_time(arg0: ErlNifTimeUnit) ErlNifTime; | |
pub extern fn enif_time_offset(arg0: ErlNifTimeUnit) ErlNifTime; | |
pub extern fn enif_convert_time_unit(arg0: ErlNifTime, arg1: ErlNifTimeUnit, arg2: ErlNifTimeUnit) ErlNifTime; | |
pub extern fn enif_now_time(env: ?*ErlNifEnv) ERL_NIF_TERM; | |
pub extern fn enif_cpu_time(env: ?*ErlNifEnv) ERL_NIF_TERM; | |
pub extern fn enif_make_unique_integer(env: ?*ErlNifEnv, properties: ErlNifUniqueInteger) ERL_NIF_TERM; | |
pub extern fn enif_is_current_process_alive(env: ?*ErlNifEnv) c_int; | |
pub extern fn enif_is_process_alive(env: ?*ErlNifEnv, pid: [*c]ErlNifPid) c_int; | |
pub extern fn enif_is_port_alive(env: ?*ErlNifEnv, port_id: [*c]ErlNifPort) c_int; | |
pub extern fn enif_get_local_port(env: ?*ErlNifEnv, arg1: ERL_NIF_TERM, port_id: [*c]ErlNifPort) c_int; | |
pub extern fn enif_term_to_binary(env: ?*ErlNifEnv, term: ERL_NIF_TERM, bin: [*c]ErlNifBinary) c_int; | |
pub extern fn enif_binary_to_term(env: ?*ErlNifEnv, data: [*c]const u8, sz: usize, term: [*c]ERL_NIF_TERM, opts: c_uint) usize; | |
pub extern fn enif_port_command(env: ?*ErlNifEnv, to_port: [*c]const ErlNifPort, msg_env: ?*ErlNifEnv, msg: ERL_NIF_TERM) c_int; | |
pub extern fn enif_thread_type() c_int; | |
pub extern fn enif_snprintf(buffer: [*c]u8, size: usize, format: [*c]const u8, ...) c_int; | |
pub extern fn enif_select(env: ?*ErlNifEnv, e: ErlNifEvent, flags: enum_ErlNifSelectFlags, obj: ?*c_void, pid: [*c]const ErlNifPid, ref: ERL_NIF_TERM) c_int; | |
pub extern fn enif_open_resource_type_x(arg0: ?*ErlNifEnv, name_str: [*c]const u8, arg2: [*c]const ErlNifResourceTypeInit, flags: ErlNifResourceFlags, tried: [*c]ErlNifResourceFlags) ?*ErlNifResourceType; | |
pub extern fn enif_monitor_process(arg0: ?*ErlNifEnv, obj: ?*c_void, arg2: [*c]const ErlNifPid, monitor: [*c]ErlNifMonitor) c_int; | |
pub extern fn enif_demonitor_process(arg0: ?*ErlNifEnv, obj: ?*c_void, monitor: [*c]const ErlNifMonitor) c_int; | |
pub extern fn enif_compare_monitors(arg0: [*c]const ErlNifMonitor, arg1: [*c]const ErlNifMonitor) c_int; | |
pub extern fn enif_hash(type_0: ErlNifHash, term: ERL_NIF_TERM, salt: ErlNifUInt64) ErlNifUInt64; | |
pub extern fn enif_whereis_pid(env: ?*ErlNifEnv, name: ERL_NIF_TERM, pid: [*c]ErlNifPid) c_int; | |
pub extern fn enif_whereis_port(env: ?*ErlNifEnv, name: ERL_NIF_TERM, port: [*c]ErlNifPort) c_int; | |
pub extern fn enif_ioq_create(opts: ErlNifIOQueueOpts) ?*ErlNifIOQueue; | |
pub extern fn enif_ioq_destroy(q: ?*ErlNifIOQueue) void; | |
pub extern fn enif_ioq_enq_binary(q: ?*ErlNifIOQueue, bin: [*c]ErlNifBinary, skip: usize) c_int; | |
pub extern fn enif_ioq_enqv(q: ?*ErlNifIOQueue, iov: [*c]ErlNifIOVec, skip: usize) c_int; | |
pub extern fn enif_ioq_size(q: ?*ErlNifIOQueue) usize; | |
pub extern fn enif_ioq_deq(q: ?*ErlNifIOQueue, count: usize, size: [*c]usize) c_int; | |
pub extern fn enif_ioq_peek(q: ?*ErlNifIOQueue, iovlen: [*c]c_int) [*c]SysIOVec; | |
pub extern fn enif_inspect_iovec(env: ?*ErlNifEnv, max_length: usize, iovec_term: ERL_NIF_TERM, tail: [*c]ERL_NIF_TERM, iovec: [*c]([*c]ErlNifIOVec)) c_int; | |
pub extern fn enif_free_iovec(iov: [*c]ErlNifIOVec) void; | |
pub extern fn enif_ioq_peek_head(env: ?*ErlNifEnv, q: ?*ErlNifIOQueue, size: [*c]usize, head: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_mutex_name(arg0: ?*ErlNifMutex) [*c]u8; | |
pub extern fn enif_cond_name(arg0: ?*ErlNifCond) [*c]u8; | |
pub extern fn enif_rwlock_name(arg0: ?*ErlNifRWLock) [*c]u8; | |
pub extern fn enif_thread_name(arg0: ErlNifTid) [*c]u8; | |
pub extern fn enif_vfprintf(arg0: [*c]FILE, fmt: [*c]const u8, arg2: [*c]struct___va_list_tag) c_int; | |
pub extern fn enif_vsnprintf(arg0: [*c]u8, arg1: usize, fmt: [*c]const u8, arg3: [*c]struct___va_list_tag) c_int; | |
pub extern fn enif_make_map_from_arrays(env: ?*ErlNifEnv, keys: [*c]ERL_NIF_TERM, values: [*c]ERL_NIF_TERM, cnt: usize, map_out: [*c]ERL_NIF_TERM) c_int; | |
pub extern fn enif_select_x(env: ?*ErlNifEnv, e: ErlNifEvent, flags: enum_ErlNifSelectFlags, obj: ?*c_void, pid: [*c]const ErlNifPid, msg: ERL_NIF_TERM, msg_env: ?*ErlNifEnv) c_int; | |
pub extern fn enif_make_monitor_term(env: ?*ErlNifEnv, arg1: [*c]const ErlNifMonitor) ERL_NIF_TERM; | |
pub extern fn enif_set_pid_undefined(pid: [*c]ErlNifPid) void; | |
pub extern fn enif_is_pid_undefined(pid: [*c]const ErlNifPid) c_int; | |
pub extern fn enif_term_type(env: ?*ErlNifEnv, term: ERL_NIF_TERM) ErlNifTermType; | |
pub fn enif_make_tuple1(env: ?*ErlNifEnv, e1: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_tuple(env, @as(c_uint, 1), e1); | |
} | |
pub fn enif_make_tuple2(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_tuple(env, @as(c_uint, 2), e1, e2); | |
} | |
pub fn enif_make_tuple3(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_tuple(env, @as(c_uint, 3), e1, e2, e3); | |
} | |
pub fn enif_make_tuple4(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_tuple(env, @as(c_uint, 4), e1, e2, e3, e4); | |
} | |
pub fn enif_make_tuple5(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_tuple(env, @as(c_uint, 5), e1, e2, e3, e4, e5); | |
} | |
pub fn enif_make_tuple6(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM, e6: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_tuple(env, @as(c_uint, 6), e1, e2, e3, e4, e5, e6); | |
} | |
pub fn enif_make_tuple7(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM, e6: ERL_NIF_TERM, e7: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_tuple(env, @as(c_uint, 7), e1, e2, e3, e4, e5, e6, e7); | |
} | |
pub fn enif_make_tuple8(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM, e6: ERL_NIF_TERM, e7: ERL_NIF_TERM, e8: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_tuple(env, @as(c_uint, 8), e1, e2, e3, e4, e5, e6, e7, e8); | |
} | |
pub fn enif_make_tuple9(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM, e6: ERL_NIF_TERM, e7: ERL_NIF_TERM, e8: ERL_NIF_TERM, e9: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_tuple(env, @as(c_uint, 9), e1, e2, e3, e4, e5, e6, e7, e8, e9); | |
} | |
pub fn enif_make_list1(env: ?*ErlNifEnv, e1: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_list(env, @as(c_uint, 1), e1); | |
} | |
pub fn enif_make_list2(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_list(env, @as(c_uint, 2), e1, e2); | |
} | |
pub fn enif_make_list3(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_list(env, @as(c_uint, 3), e1, e2, e3); | |
} | |
pub fn enif_make_list4(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_list(env, @as(c_uint, 4), e1, e2, e3, e4); | |
} | |
pub fn enif_make_list5(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_list(env, @as(c_uint, 5), e1, e2, e3, e4, e5); | |
} | |
pub fn enif_make_list6(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM, e6: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_list(env, @as(c_uint, 6), e1, e2, e3, e4, e5, e6); | |
} | |
pub fn enif_make_list7(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM, e6: ERL_NIF_TERM, e7: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_list(env, @as(c_uint, 7), e1, e2, e3, e4, e5, e6, e7); | |
} | |
pub fn enif_make_list8(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM, e6: ERL_NIF_TERM, e7: ERL_NIF_TERM, e8: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_list(env, @as(c_uint, 8), e1, e2, e3, e4, e5, e6, e7, e8); | |
} | |
pub fn enif_make_list9(env: ?*ErlNifEnv, e1: ERL_NIF_TERM, e2: ERL_NIF_TERM, e3: ERL_NIF_TERM, e4: ERL_NIF_TERM, e5: ERL_NIF_TERM, e6: ERL_NIF_TERM, e7: ERL_NIF_TERM, e8: ERL_NIF_TERM, e9: ERL_NIF_TERM) ERL_NIF_TERM { | |
return enif_make_list(env, @as(c_uint, 9), e1, e2, e3, e4, e5, e6, e7, e8, e9); | |
} | |
pub const __GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1; | |
pub const _STDC_PREDEF_H = 1; | |
pub const ERL_NIF_VM_VARIANT = "beam.vanilla"; | |
pub const __GNUC_VA_LIST = 1; | |
pub const __BIGGEST_ALIGNMENT__ = 16; | |
pub const EXIT_SUCCESS = 0; | |
pub const _IO_USER_LOCK = 32768; | |
pub const __INT64_FMTd__ = "ld"; | |
pub const __STDC_VERSION__ = @as(c_long, 201112); | |
pub const __SIZEOF_FLOAT__ = 4; | |
pub const ERL_NAPI_SINT64_MAX__ = @as(c_long, 9223372036854775807); | |
pub const __INT_LEAST32_FMTi__ = "i"; | |
pub const __INT_LEAST8_FMTi__ = "hhi"; | |
pub const __LDBL_EPSILON__ = -nan; | |
pub const __LZCNT__ = 1; | |
pub const __INT_LEAST32_FMTd__ = "d"; | |
pub const __STDC_UTF_32__ = 1; | |
pub const __INVPCID__ = 1; | |
pub const __SIG_ATOMIC_WIDTH__ = 32; | |
pub const __FD_ZERO_STOS = "stosq"; | |
pub const __UINT_FAST64_FMTX__ = "lX"; | |
pub const __GCC_ATOMIC_LLONG_LOCK_FREE = 2; | |
pub const __SEG_FS = 1; | |
pub const __clang_version__ = "9.0.0 (tags/RELEASE_900/final)"; | |
pub const __UINT_LEAST8_FMTo__ = "hho"; | |
pub const __GCC_ASM_FLAG_OUTPUTS__ = 1; | |
pub const __SIZEOF_DOUBLE__ = 8; | |
pub const __INTMAX_FMTd__ = "ld"; | |
pub const __HAVE_DISTINCT_FLOAT16 = __HAVE_FLOAT16; | |
pub const __CLANG_ATOMIC_CHAR_LOCK_FREE = 2; | |
pub const LITTLE_ENDIAN = __LITTLE_ENDIAN; | |
pub const __INT_LEAST16_FMTi__ = "hi"; | |
pub const __GCC_ATOMIC_SHORT_LOCK_FREE = 2; | |
pub const _STDLIB_H = 1; | |
pub const _BITS_STDIO_LIM_H = 1; | |
pub const __FMA__ = 1; | |
pub const __MMX__ = 1; | |
pub const __HAVE_FLOAT64 = 1; | |
pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 = 1; | |
pub const BYTE_ORDER = __BYTE_ORDER; | |
pub const __SIZE_FMTX__ = "lX"; | |
pub const __ID_T_TYPE = __U32_TYPE; | |
pub const _THREAD_SHARED_TYPES_H = 1; | |
pub const enif_make_uint64 = enif_make_ulong; | |
pub const __INO_T_TYPE = __SYSCALL_ULONG_TYPE; | |
pub const _BITS_TYPES_H = 1; | |
pub const ERTS_NAPI_SEC__ = 0; | |
pub const __FSBLKCNT_T_TYPE = __SYSCALL_ULONG_TYPE; | |
pub const __ptr_t = [*c]void; | |
pub const __WCHAR_WIDTH__ = 32; | |
pub const ERTS_NAPI_TIME_ERROR__ = ERL_NAPI_SINT64_MIN__; | |
pub const __FSGSBASE__ = 1; | |
pub const __STDC_IEC_559_COMPLEX__ = 1; | |
pub const __USE_MISC = 1; | |
pub const __FSBLKCNT64_T_TYPE = __UQUAD_TYPE; | |
pub const __SIZEOF_PTHREAD_ATTR_T = 56; | |
pub const __PTRDIFF_FMTd__ = "ld"; | |
pub const __DBL_MIN_EXP__ = -1021; | |
pub const __HAVE_FLOAT32X = 1; | |
pub const __lldiv_t_defined = 1; | |
pub const __FLT_EVAL_METHOD__ = 0; | |
pub const __SSE_MATH__ = 1; | |
pub const __USECONDS_T_TYPE = __U32_TYPE; | |
pub const __PID_T_TYPE = __S32_TYPE; | |
pub const __UINT_FAST8_FMTo__ = "hho"; | |
pub const ERL_NIF_SELECT_WRITE_CANCELLED = 1 << 5; | |
pub const __UINT_LEAST64_MAX__ = @as(c_ulong, 18446744073709551615); | |
pub const _ALLOCA_H = 1; | |
pub const __UINT_LEAST64_FMTx__ = "lx"; | |
pub const __INT8_MAX__ = 127; | |
pub const __NLINK_T_TYPE = __SYSCALL_ULONG_TYPE; | |
pub const __DBL_HAS_DENORM__ = 1; | |
pub const __FLOAT128__ = 1; | |
pub const __HAVE_GENERIC_SELECTION = 1; | |
pub const __ATOMIC_RELAXED = 0; | |
pub const __DBL_DECIMAL_DIG__ = 17; | |
pub const __SIZEOF_SHORT__ = 2; | |
pub const ____FILE_defined = 1; | |
pub const __UINT16_FMTX__ = "hX"; | |
pub const __UINT_FAST16_MAX__ = 65535; | |
pub const __PTHREAD_MUTEX_HAVE_PREV = 1; | |
pub const SIZEOF_LONG_LONG = 8; | |
pub const __timeval_defined = 1; | |
pub const __SSSE3__ = 1; | |
pub const __CLANG_ATOMIC_SHORT_LOCK_FREE = 2; | |
pub const __CONSTANT_CFSTRINGS__ = 1; | |
pub const WEXITED = 4; | |
pub const __MODE_T_TYPE = __U32_TYPE; | |
pub const _SYS_CDEFS_H = 1; | |
pub const _ATFILE_SOURCE = 1; | |
pub const __AVX2__ = 1; | |
pub const __RLIM_T_TYPE = __SYSCALL_ULONG_TYPE; | |
pub const __LDBL_MAX_EXP__ = 16384; | |
pub const __WINT_MAX__ = @as(c_uint, 4294967295); | |
pub const __USE_POSIX199309 = 1; | |
pub const __glibc_has_include = __has_include; | |
pub const _STDIO_H = 1; | |
pub const __STDC_ISO_10646__ = @as(c_long, 201706); | |
pub const __NO_MATH_INLINES = 1; | |
pub const __WCHAR_TYPE__ = int; | |
pub const __BLKCNT64_T_TYPE = __SQUAD_TYPE; | |
pub const __LONG_MAX__ = @as(c_long, 9223372036854775807); | |
pub const __STDC_HOSTED__ = 1; | |
pub const __pic__ = 2; | |
pub const __INT_FAST16_FMTi__ = "hi"; | |
pub const __PTRDIFF_WIDTH__ = 64; | |
pub const __INT_LEAST32_TYPE__ = int; | |
pub const __SCHAR_MAX__ = 127; | |
pub const __USE_POSIX2 = 1; | |
pub const __LDBL_DENORM_MIN__ = -nan; | |
pub const __HAVE_FLOATN_NOT_TYPEDEF = 0; | |
pub const __TIMESIZE = __WORDSIZE; | |
pub const RAND_MAX = 2147483647; | |
pub const __USE_XOPEN2K = 1; | |
pub const __FLOAT_WORD_ORDER = __BYTE_ORDER; | |
pub const _IOFBF = 0; | |
pub const __USE_FORTIFY_LEVEL = 0; | |
pub const __INT64_C_SUFFIX__ = L; | |
pub const __ELF__ = 1; | |
pub const __FSFILCNT_T_TYPE = __SYSCALL_ULONG_TYPE; | |
pub const __LDBL_MANT_DIG__ = 64; | |
pub const __PTHREAD_MUTEX_LOCK_ELISION = 1; | |
pub const __SSIZE_T_TYPE = __SWORD_TYPE; | |
pub const __USE_XOPEN2K8 = 1; | |
pub const __CLANG_ATOMIC_INT_LOCK_FREE = 2; | |
pub const __SIZEOF_PTRDIFF_T__ = 8; | |
pub const ERL_NIF_INLINE = __inline__; | |
pub const __SIG_ATOMIC_MAX__ = 2147483647; | |
pub const __struct_FILE_defined = 1; | |
pub const _IO_EOF_SEEN = 16; | |
pub const __USE_ATFILE = 1; | |
pub const __UINT64_FMTX__ = "lX"; | |
pub const __WALL = 1073741824; | |
pub const __UINT64_MAX__ = @as(c_ulong, 18446744073709551615); | |
pub const ERL_NIF_THR_UNDEFINED = 0; | |
pub const __DBL_MANT_DIG__ = 53; | |
pub const __FLT_DECIMAL_DIG__ = 9; | |
pub const _____fpos_t_defined = 1; | |
pub const ERL_NIF_IOVEC_SIZE = 16; | |
pub const __INT_LEAST32_MAX__ = 2147483647; | |
pub const __DBL_DIG__ = 15; | |
pub const __GLIBC_USE_DEPRECATED_SCANF = 0; | |
pub const __ATOMIC_ACQUIRE = 2; | |
pub const __OPENCL_MEMORY_SCOPE_WORK_GROUP = 1; | |
pub const __USE_ISOC95 = 1; | |
pub const __UID_T_TYPE = __U32_TYPE; | |
pub const __UINT_FAST16_FMTu__ = "hu"; | |
pub const __INTPTR_FMTi__ = "li"; | |
pub const __UINT_FAST8_FMTX__ = "hhX"; | |
pub const __LITTLE_ENDIAN__ = 1; | |
pub const __SSE__ = 1; | |
pub const __FLT_HAS_QUIET_NAN__ = 1; | |
pub const __SIZEOF_SIZE_T__ = 8; | |
pub const __SEG_GS = 1; | |
pub const SIZEOF_SHORT = 2; | |
pub const __UINT_LEAST16_FMTo__ = "ho"; | |
pub const __UINT8_FMTo__ = "hho"; | |
pub const __HAVE_FLOAT32 = 1; | |
pub const __UINT_LEAST16_FMTx__ = "hx"; | |
pub const __CLANG_ATOMIC_WCHAR_T_LOCK_FREE = 2; | |
pub const __UINT_FAST16_FMTX__ = "hX"; | |
pub const ERL_NIF_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD = 2; | |
pub const __UINT_FAST32_FMTx__ = "x"; | |
pub const __VERSION__ = "Clang 9.0.0 (tags/RELEASE_900/final)"; | |
pub const __UINTPTR_MAX__ = @as(c_ulong, 18446744073709551615); | |
pub const __UINT_FAST8_FMTu__ = "hhu"; | |
pub const __UINT_LEAST8_FMTu__ = "hhu"; | |
pub const __UINT_LEAST64_FMTo__ = "lo"; | |
pub const __clockid_t_defined = 1; | |
pub const __UINT_LEAST8_MAX__ = 255; | |
pub const __SYSCALL_ULONG_TYPE = __ULONGWORD_TYPE; | |
pub const __warnattr = msg; | |
pub const __RDRND__ = 1; | |
pub const __STD_TYPE = typedef; | |
pub const __SIZEOF_WCHAR_T__ = 4; | |
pub const __MOVBE__ = 1; | |
pub const ERL_NIF_THR_DIRTY_IO_SCHEDULER = 3; | |
pub const __GLIBC_USE_DEPRECATED_GETS = 0; | |
pub const __LDBL_MAX__ = -nan; | |
pub const __UINT16_MAX__ = 65535; | |
pub const _LP64 = 1; | |
pub const __CLOCK_T_TYPE = __SYSCALL_SLONG_TYPE; | |
pub const FD_SETSIZE = __FD_SETSIZE; | |
pub const __x86_64 = 1; | |
pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED = 1; | |
pub const __code_model_small_ = 1; | |
pub const linux = 1; | |
pub const __SIZEOF_WINT_T__ = 4; | |
pub const __UINTMAX_FMTo__ = "lo"; | |
pub const __FLT_DIG__ = 6; | |
pub const __UINT_LEAST8_FMTX__ = "hhX"; | |
pub const __INT16_MAX__ = 32767; | |
pub const __HAVE_FLOAT64X = 1; | |
pub const __WINT_UNSIGNED__ = 1; | |
pub const __HAVE_FLOAT16 = 0; | |
pub const __FLT_MAX_10_EXP__ = 38; | |
pub const _FEATURES_H = 1; | |
pub const __UINTPTR_FMTX__ = "lX"; | |
pub const __UINT_LEAST16_FMTu__ = "hu"; | |
pub const __CLANG_ATOMIC_POINTER_LOCK_FREE = 2; | |
pub const __WINT_WIDTH__ = 32; | |
pub const __F16C__ = 1; | |
pub const __SHRT_MAX__ = 32767; | |
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T = 8; | |
pub const __GCC_ATOMIC_BOOL_LOCK_FREE = 2; | |
pub const __POINTER_WIDTH__ = 64; | |
pub const __PTRDIFF_MAX__ = @as(c_long, 9223372036854775807); | |
pub const __tune_corei7__ = 1; | |
pub const __INT32_FMTd__ = "d"; | |
pub const __DBL_MIN__ = -nan; | |
pub const __SIZEOF_LONG__ = 8; | |
pub const __S32_TYPE = int; | |
pub const __TIME_T_TYPE = __SYSCALL_SLONG_TYPE; | |
pub const __INTPTR_WIDTH__ = 64; | |
pub const __INT_FAST32_TYPE__ = int; | |
pub const ERL_NIF_SELECT_FAILED = 1 << 3; | |
pub const __TIME64_T_TYPE = __TIME_T_TYPE; | |
pub const __W_CONTINUED = 65535; | |
pub const __NO_INLINE__ = 1; | |
pub const __UINT_FAST32_FMTX__ = "X"; | |
pub const _POSIX_SOURCE = 1; | |
pub const __LITTLE_ENDIAN = 1234; | |
pub const __HAVE_FLOAT128 = 0; | |
pub const __gnu_linux__ = 1; | |
pub const __INT_FAST32_MAX__ = 2147483647; | |
pub const _BITS_PTHREADTYPES_COMMON_H = 1; | |
pub const __corei7__ = 1; | |
pub const __UINTMAX_FMTu__ = "lu"; | |
pub const __BMI__ = 1; | |
pub const __FILE_defined = 1; | |
pub const _____fpos64_t_defined = 1; | |
pub const ERL_NIF_SELECT_STOP_CALLED = 1 << 0; | |
pub const __FLT_RADIX__ = 2; | |
pub const __GLIBC_MINOR__ = 30; | |
pub const __timer_t_defined = 1; | |
pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1; | |
pub const __GCC_ATOMIC_INT_LOCK_FREE = 2; | |
pub const _BITS_BYTESWAP_H = 1; | |
pub const ERL_NIF_MIN_ERTS_VERSION = "erts-10.4"; | |
pub const __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES = 3; | |
pub const _STRUCT_TIMESPEC = 1; | |
pub const _BITS_STDINT_INTN_H = 1; | |
pub const __PRAGMA_REDEFINE_EXTNAME = 1; | |
pub const __INT_FAST8_FMTd__ = "hhd"; | |
pub const __KEY_T_TYPE = __S32_TYPE; | |
pub const SEEK_SET = 0; | |
pub const __USE_POSIX199506 = 1; | |
pub const __INT32_TYPE__ = int; | |
pub const __CPU_MASK_TYPE = __SYSCALL_ULONG_TYPE; | |
pub const FOPEN_MAX = 16; | |
pub const __UINTMAX_WIDTH__ = 64; | |
pub const __PTHREAD_MUTEX_USE_UNION = 0; | |
pub const __FLT_MIN__ = -nan; | |
pub const __INT64_FMTi__ = "li"; | |
pub const __UINT_FAST64_FMTu__ = "lu"; | |
pub const __INT8_FMTd__ = "hhd"; | |
pub const __INT_FAST16_TYPE__ = short; | |
pub const __HAVE_DISTINCT_FLOAT128 = 0; | |
pub const __FLT_MAX_EXP__ = 128; | |
pub const __XSAVE__ = 1; | |
pub const __DBL_MAX_10_EXP__ = 308; | |
pub const __LDBL_MIN__ = -nan; | |
pub const __INT_FAST64_FMTi__ = "li"; | |
pub const __INT_LEAST8_FMTd__ = "hhd"; | |
pub const __CLANG_ATOMIC_LLONG_LOCK_FREE = 2; | |
pub const __FSFILCNT64_T_TYPE = __UQUAD_TYPE; | |
pub const enif_get_uint64 = enif_get_ulong; | |
pub const __UINT_LEAST32_FMTX__ = "X"; | |
pub const __PIC__ = 2; | |
pub const __GID_T_TYPE = __U32_TYPE; | |
pub const __UINTMAX_MAX__ = @as(c_ulong, 18446744073709551615); | |
pub const __UINT_FAST16_FMTo__ = "ho"; | |
pub const _DEFAULT_SOURCE = 1; | |
pub const __FD_SETSIZE = 1024; | |
pub const __LDBL_DECIMAL_DIG__ = 21; | |
pub const __UINT_LEAST64_FMTX__ = "lX"; | |
pub const SIZEOF_INT = 4; | |
pub const __clang_minor__ = 0; | |
pub const __LDBL_REDIR_DECL = name; | |
pub const ERL_NIF_THR_DIRTY_CPU_SCHEDULER = 2; | |
pub const __OFF64_T_TYPE = __SQUAD_TYPE; | |
pub const __SIZEOF_FLOAT128__ = 16; | |
pub const __CLOCKID_T_TYPE = __S32_TYPE; | |
pub const __UINT_FAST64_FMTo__ = "lo"; | |
pub const __SIZE_FMTx__ = "lx"; | |
pub const ERL_NIF_SELECT_READ_CANCELLED = 1 << 4; | |
pub const __DBL_MAX__ = -nan; | |
pub const __DBL_EPSILON__ = -nan; | |
pub const __UINT64_FMTx__ = "lx"; | |
pub const P_tmpdir = "/tmp"; | |
pub const __BLKCNT_T_TYPE = __SYSCALL_SLONG_TYPE; | |
pub const __CHAR_BIT__ = 8; | |
pub const __WCOREFLAG = 128; | |
pub const SEEK_END = 2; | |
pub const __INT16_FMTi__ = "hi"; | |
pub const __SLONG32_TYPE = int; | |
pub const SEEK_CUR = 1; | |
pub const _DEBUG = 1; | |
pub const __GNUC_MINOR__ = 2; | |
pub const __restrict_arr = __restrict; | |
pub const __UINT_FAST32_MAX__ = @as(c_uint, 4294967295); | |
pub const __RLIM_T_MATCHES_RLIM64_T = 1; | |
pub const __UINT8_FMTX__ = "hhX"; | |
pub const NFDBITS = __NFDBITS; | |
pub const __FLT_EPSILON__ = -nan; | |
pub const __UINTPTR_WIDTH__ = 64; | |
pub const __llvm__ = 1; | |
pub const __UINT_FAST64_MAX__ = @as(c_ulong, 18446744073709551615); | |
pub const __INT_FAST32_FMTi__ = "i"; | |
pub const __time_t_defined = 1; | |
pub const __WNOTHREAD = 536870912; | |
pub const __FLT_HAS_INFINITY__ = 1; | |
pub const __FSWORD_T_TYPE = __SYSCALL_SLONG_TYPE; | |
pub const ERTS_NAPI_USEC__ = 2; | |
pub const __DADDR_T_TYPE = __S32_TYPE; | |
pub const __AES__ = 1; | |
pub const __OFF_T_TYPE = __SYSCALL_SLONG_TYPE; | |
pub const NULL = if (@typeId(@typeOf(0)) == @import("builtin").TypeId.Pointer) @ptrCast([*c]void, 0) else if (@typeId(@typeOf(0)) == @import("builtin").TypeId.Int) @intToPtr([*c]void, 0) else @as([*c]void, 0); | |
pub const __UINT8_FMTx__ = "hhx"; | |
pub const __INTMAX_C_SUFFIX__ = L; | |
pub const __ORDER_LITTLE_ENDIAN__ = 1234; | |
pub const __GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2; | |
pub const __INT16_FMTd__ = "hd"; | |
pub const __UINT32_FMTX__ = "X"; | |
pub const __SUSECONDS_T_TYPE = __SYSCALL_SLONG_TYPE; | |
pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1; | |
pub const __PTHREAD_MUTEX_NUSERS_AFTER_KIND = 0; | |
pub const __UINT32_C_SUFFIX__ = U; | |
pub const __INT32_MAX__ = 2147483647; | |
pub const __GCC_ATOMIC_CHAR_LOCK_FREE = 2; | |
pub const __INTMAX_WIDTH__ = 64; | |
pub const enif_make_int64 = enif_make_long; | |
pub const __INO64_T_TYPE = __UQUAD_TYPE; | |
pub const __CLANG_ATOMIC_BOOL_LOCK_FREE = 2; | |
pub const EXIT_FAILURE = 1; | |
pub const __USE_POSIX = 1; | |
pub const __BIT_TYPES_DEFINED__ = 1; | |
pub const __SIZE_FMTo__ = "lo"; | |
pub const __DBL_HAS_QUIET_NAN__ = 1; | |
pub const ERL_NAPI_SINT64_MIN__ = if (@typeId(@typeOf(-@as(c_long, 1))) == @import("builtin").TypeId.Pointer) @ptrCast(-ERL_NAPI_SINT64_MAX__, -@as(c_long, 1)) else if (@typeId(@typeOf(-@as(c_long, 1))) == @import("builtin").TypeId.Int) @intToPtr(-ERL_NAPI_SINT64_MAX__, -@as(c_long, 1)) else @as(-ERL_NAPI_SINT64_MAX__, -@as(c_long, 1)); | |
pub const __PDP_ENDIAN = 3412; | |
pub const __INT_FAST8_FMTi__ = "hhi"; | |
pub const __UINT_LEAST32_FMTo__ = "o"; | |
pub const __STDC_UTF_16__ = 1; | |
pub const __UINT_LEAST32_MAX__ = @as(c_uint, 4294967295); | |
pub const __ATOMIC_RELEASE = 3; | |
pub const __UINT_FAST16_FMTx__ = "hx"; | |
pub const __UINTMAX_C_SUFFIX__ = UL; | |
pub const __FLT_MIN_EXP__ = -125; | |
pub const ERTS_NAPI_NSEC__ = 3; | |
pub const __SIZEOF_LONG_DOUBLE__ = 16; | |
pub const __UINT_LEAST64_FMTu__ = "lu"; | |
pub const __ldiv_t_defined = 1; | |
pub const __GCC_ATOMIC_LONG_LOCK_FREE = 2; | |
pub const __ORDER_PDP_ENDIAN__ = 3412; | |
pub const __SIZEOF_PTHREAD_BARRIER_T = 32; | |
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT = 0; | |
pub const __INT_FAST64_FMTd__ = "ld"; | |
pub const FILENAME_MAX = 4096; | |
pub const __CLANG_ATOMIC_LONG_LOCK_FREE = 2; | |
pub const __GXX_ABI_VERSION = 1002; | |
pub const __INT16_TYPE__ = short; | |
pub const __SSE2_MATH__ = 1; | |
pub const __FLT_MANT_DIG__ = 24; | |
pub const __GLIBC_USE_IEC_60559_TYPES_EXT = 0; | |
pub const __UINT_FAST64_FMTx__ = "lx"; | |
pub const ERL_NIF_SELECT_INVALID_EVENT = 1 << 2; | |
pub const __HAVE_FLOAT64X_LONG_DOUBLE = 1; | |
pub const __STDC__ = 1; | |
pub const __INT_FAST8_MAX__ = 127; | |
pub const __INTPTR_FMTd__ = "ld"; | |
pub const __GNUC_PATCHLEVEL__ = 1; | |
pub const __UINT_LEAST8_FMTx__ = "hhx"; | |
pub const __SIZE_WIDTH__ = 64; | |
pub const __INT_LEAST64_FMTi__ = "li"; | |
pub const __HAVE_DISTINCT_FLOAT64 = 0; | |
pub const __SSE4_2__ = 1; | |
pub const __STDC_IEC_559__ = 1; | |
pub const __AVX__ = 1; | |
pub const __INT_FAST16_MAX__ = 32767; | |
pub const __USE_ISOC99 = 1; | |
pub const __INTPTR_MAX__ = @as(c_long, 9223372036854775807); | |
pub const __CLANG_ATOMIC_CHAR16_T_LOCK_FREE = 2; | |
pub const __UINT64_FMTu__ = "lu"; | |
pub const __have_pthread_attr_t = 1; | |
pub const __BYTE_ORDER__ = __ORDER_LITTLE_ENDIAN__; | |
pub const __SSE2__ = 1; | |
pub const __INT_MAX__ = 2147483647; | |
pub const __BLKSIZE_T_TYPE = __SYSCALL_SLONG_TYPE; | |
pub const __INTMAX_FMTi__ = "li"; | |
pub const __DBL_DENORM_MIN__ = -nan; | |
pub const __clang_major__ = 9; | |
pub const __GNUC__ = 4; | |
pub const __UINT32_MAX__ = @as(c_uint, 4294967295); | |
pub const SIZEOF_LONG = 8; | |
pub const _POSIX_C_SOURCE = @as(c_long, 200809); | |
pub const enif_get_int64 = enif_get_long; | |
pub const __FLT_DENORM_MIN__ = -nan; | |
pub const __DBL_MAX_EXP__ = 1024; | |
pub const __INT8_FMTi__ = "hhi"; | |
pub const __BIG_ENDIAN = 4321; | |
pub const L_tmpnam = 20; | |
pub const __UINT_LEAST16_MAX__ = 65535; | |
pub const ERL_NIF_MINOR_VERSION = 15; | |
pub const __HAVE_DISTINCT_FLOAT32X = 0; | |
pub const __LDBL_HAS_DENORM__ = 1; | |
pub const __LDBL_HAS_QUIET_NAN__ = 1; | |
pub const SIZEOF_CHAR = 1; | |
pub const TMP_MAX = 238328; | |
pub const __UINT_FAST8_MAX__ = 255; | |
pub const __DBL_MIN_10_EXP__ = -307; | |
pub const __GLIBC_USE_LIB_EXT2 = 0; | |
pub const __SIZEOF_PTHREAD_MUTEX_T = 40; | |
pub const ERL_NIF_MAJOR_VERSION = 2; | |
pub const __UINT8_FMTu__ = "hhu"; | |
pub const __OFF_T_MATCHES_OFF64_T = 1; | |
pub const __RLIM64_T_TYPE = __UQUAD_TYPE; | |
pub const __HAVE_FLOAT128X = 0; | |
pub const ERL_NIF_TIME_ERROR = if (@typeId(@typeOf(ERTS_NAPI_TIME_ERROR__)) == @import("builtin").TypeId.Pointer) @ptrCast(ErlNifSInt64, ERTS_NAPI_TIME_ERROR__) else if (@typeId(@typeOf(ERTS_NAPI_TIME_ERROR__)) == @import("builtin").TypeId.Int) @intToPtr(ErlNifSInt64, ERTS_NAPI_TIME_ERROR__) else @as(ErlNifSInt64, ERTS_NAPI_TIME_ERROR__); | |
pub const __INT_FAST64_MAX__ = @as(c_long, 9223372036854775807); | |
pub const __SSE3__ = 1; | |
pub const __UINT16_FMTu__ = "hu"; | |
pub const __ATOMIC_SEQ_CST = 5; | |
pub const __SIZE_FMTu__ = "lu"; | |
pub const __LDBL_MIN_EXP__ = -16381; | |
pub const __UINT_FAST32_FMTu__ = "u"; | |
pub const ERL_NIF_INIT_ARGS = void; | |
pub const __SSP_STRONG__ = 2; | |
pub const __BYTE_ORDER = __LITTLE_ENDIAN; | |
pub const __clang_patchlevel__ = 0; | |
pub const ERTS_NAPI_MSEC__ = 1; | |
pub const __SIZEOF_LONG_LONG__ = 8; | |
pub const __BMI2__ = 1; | |
pub const EOF = -1; | |
pub const __HAVE_DISTINCT_FLOAT64X = 0; | |
pub const __GNUC_STDC_INLINE__ = 1; | |
pub const __PCLMUL__ = 1; | |
pub const __FXSR__ = 1; | |
pub const __UINT8_MAX__ = 255; | |
pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1; | |
pub const _IOLBF = 1; | |
pub const __UINT32_FMTx__ = "x"; | |
pub const __UINT16_FMTo__ = "ho"; | |
pub const __POPCNT__ = 1; | |
pub const __OPENCL_MEMORY_SCOPE_DEVICE = 2; | |
pub const __SIZEOF_PTHREAD_CONDATTR_T = 4; | |
pub const __UINT32_FMTu__ = "u"; | |
pub const WNOHANG = 1; | |
pub const __SIZEOF_PTHREAD_COND_T = 48; | |
pub const __SIZEOF_POINTER__ = 8; | |
pub const __TIMER_T_TYPE = [*c]void; | |
pub const __SIZE_MAX__ = @as(c_ulong, 18446744073709551615); | |
pub const __unix = 1; | |
pub const _BITS_UINTN_IDENTITY_H = 1; | |
pub const __GLIBC_USE_IEC_60559_BFP_EXT = 0; | |
pub const __INT_FAST16_FMTd__ = "hd"; | |
pub const unix = 1; | |
pub const __UINT_LEAST32_FMTu__ = "u"; | |
pub const __FLT_MAX__ = -nan; | |
pub const __corei7 = 1; | |
pub const BUFSIZ = 8192; | |
pub const __HAVE_DISTINCT_FLOAT32 = 0; | |
pub const __USE_ISOC11 = 1; | |
pub const __GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2; | |
pub const __ATOMIC_CONSUME = 1; | |
pub const __unix__ = 1; | |
pub const __x86_64__ = 1; | |
pub const __LDBL_HAS_INFINITY__ = 1; | |
pub const __WORDSIZE_TIME64_COMPAT32 = 1; | |
pub const __UINTMAX_FMTx__ = "lx"; | |
pub const __UINT64_C_SUFFIX__ = UL; | |
pub const __GNU_LIBRARY__ = 6; | |
pub const __FLT_MIN_10_EXP__ = -37; | |
pub const __INT_LEAST16_MAX__ = 32767; | |
pub const __clock_t_defined = 1; | |
pub const __UINT32_FMTo__ = "o"; | |
pub const __UINTPTR_FMTo__ = "lo"; | |
pub const _SYS_SELECT_H = 1; | |
pub const __INT_LEAST16_FMTd__ = "hd"; | |
pub const __UINTPTR_FMTx__ = "lx"; | |
pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1; | |
pub const _IONBF = 2; | |
pub const __INT_LEAST64_FMTd__ = "ld"; | |
pub const _SYS_TYPES_H = 1; | |
pub const __INT_LEAST16_TYPE__ = short; | |
pub const __attribute_alloc_size__ = params; | |
pub const __attribute_copy__ = arg; | |
pub const __ORDER_BIG_ENDIAN__ = 4321; | |
pub const __LDBL_MIN_10_EXP__ = -4931; | |
pub const __INT_LEAST8_MAX__ = 127; | |
pub const __SIZEOF_INT__ = 4; | |
pub const __USE_POSIX_IMPLICITLY = 1; | |
pub const __GCC_ATOMIC_POINTER_LOCK_FREE = 2; | |
pub const _IO_ERR_SEEN = 32; | |
pub const __amd64 = 1; | |
pub const _BITS_TIME64_H = 1; | |
pub const __OBJC_BOOL_IS_BOOL = 0; | |
pub const __LDBL_MAX_10_EXP__ = 4932; | |
pub const L_ctermid = 9; | |
pub const __SIZEOF_INT128__ = 16; | |
pub const __UINT_FAST8_FMTx__ = "hhx"; | |
pub const __SIZEOF_PTHREAD_RWLOCK_T = 56; | |
pub const __glibc_c99_flexarr_available = 1; | |
pub const __linux = 1; | |
pub const __sigset_t_defined = 1; | |
pub const __UINT16_FMTx__ = "hx"; | |
pub const __UINTPTR_FMTu__ = "lu"; | |
pub const __UINT_LEAST16_FMTX__ = "hX"; | |
pub const __SIZEOF_PTHREAD_MUTEXATTR_T = 4; | |
pub const __amd64__ = 1; | |
pub const __UINT_FAST32_FMTo__ = "o"; | |
pub const __linux__ = 1; | |
pub const __clang__ = 1; | |
pub const __LP64__ = 1; | |
pub const __SYSCALL_WORDSIZE = 64; | |
pub const __PTRDIFF_FMTi__ = "li"; | |
pub const __SSE4_1__ = 1; | |
pub const __LDBL_DIG__ = 18; | |
pub const __GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2; | |
pub const _BITS_TYPESIZES_H = 1; | |
pub const SIZEOF_VOID_P = 8; | |
pub const WCONTINUED = 8; | |
pub const __XSAVEOPT__ = 1; | |
pub const __UINT64_FMTo__ = "lo"; | |
pub const __INT_FAST32_FMTd__ = "d"; | |
pub const _BITS_PTHREADTYPES_ARCH_H = 1; | |
pub const __HAVE_DISTINCT_FLOAT128X = __HAVE_FLOAT128X; | |
pub const BIG_ENDIAN = __BIG_ENDIAN; | |
pub const __ATOMIC_ACQ_REL = 4; | |
pub const PDP_ENDIAN = __PDP_ENDIAN; | |
pub const __SIZEOF_PTHREAD_BARRIERATTR_T = 4; | |
pub const __LONG_LONG_MAX__ = @as(c_longlong, 9223372036854775807); | |
pub const __OPENCL_MEMORY_SCOPE_SUB_GROUP = 4; | |
pub const _ENDIAN_H = 1; | |
pub const ____mbstate_t_defined = 1; | |
pub const __INO_T_MATCHES_INO64_T = 1; | |
pub const __GLIBC__ = 2; | |
pub const WUNTRACED = 2; | |
pub const __INTMAX_MAX__ = @as(c_long, 9223372036854775807); | |
pub const __UINT_LEAST32_FMTx__ = "x"; | |
pub const __WORDSIZE = 64; | |
pub const __WCHAR_MAX__ = 2147483647; | |
pub const __INT64_MAX__ = @as(c_long, 9223372036854775807); | |
pub const WSTOPPED = 2; | |
pub const __CLANG_ATOMIC_CHAR32_T_LOCK_FREE = 2; | |
pub const __INT_LEAST64_MAX__ = @as(c_long, 9223372036854775807); | |
pub const WNOWAIT = 16777216; | |
pub const __UINTMAX_FMTX__ = "lX"; | |
pub const __OPENCL_MEMORY_SCOPE_WORK_ITEM = 0; | |
pub const __FLT_HAS_DENORM__ = 1; | |
pub const __DECIMAL_DIG__ = __LDBL_DECIMAL_DIG__; | |
pub const ERL_NIF_SELECT_STOP_SCHEDULED = 1 << 1; | |
pub const __SYSCALL_SLONG_TYPE = __SLONGWORD_TYPE; | |
pub const __WCLONE = 2147483648; | |
pub const __DEV_T_TYPE = __UQUAD_TYPE; | |
pub const ERL_NIF_THR_NORMAL_SCHEDULER = 1; | |
pub const __INT32_FMTi__ = "i"; | |
pub const __DBL_HAS_INFINITY__ = 1; | |
pub const __FINITE_MATH_ONLY__ = 0; | |
pub const ErlNifSelectFlags = enum_ErlNifSelectFlags; | |
pub const timeval = struct_timeval; | |
pub const timespec = struct_timespec; | |
pub const __pthread_rwlock_arch_t = struct___pthread_rwlock_arch_t; | |
pub const __pthread_internal_list = struct___pthread_internal_list; | |
pub const __pthread_mutex_s = struct___pthread_mutex_s; | |
pub const __pthread_cond_s = struct___pthread_cond_s; | |
pub const random_data = struct_random_data; | |
pub const drand48_data = struct_drand48_data; | |
pub const __va_list_tag = struct___va_list_tag; | |
pub const _G_fpos_t = struct__G_fpos_t; | |
pub const _G_fpos64_t = struct__G_fpos64_t; | |
pub const _IO_marker = struct__IO_marker; | |
pub const _IO_codecvt = struct__IO_codecvt; | |
pub const _IO_wide_data = struct__IO_wide_data; | |
pub const _IO_FILE = struct__IO_FILE; | |
pub const enif_environment_t = struct_enif_environment_t; | |
pub const enif_func_t = struct_enif_func_t; | |
pub const enif_entry_t = struct_enif_entry_t; | |
pub const enif_resource_type_t = struct_enif_resource_type_t; | |
pub const ErlDrvTid_ = struct_ErlDrvTid_; | |
pub const ErlDrvMutex_ = struct_ErlDrvMutex_; | |
pub const ErlDrvCond_ = struct_ErlDrvCond_; | |
pub const ErlDrvRWLock_ = struct_ErlDrvRWLock_; | |
pub const ErtsDynamicWStack_ = struct_ErtsDynamicWStack_; | |
pub const erl_nif_io_vec = struct_erl_nif_io_vec; | |
pub const erts_io_queue = struct_erts_io_queue; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment