qjs_sys/
raw.rs

1/* automatically generated by rust-bindgen */
2
3pub const JS_PROP_CONFIGURABLE: u32 = 1;
4pub const JS_PROP_WRITABLE: u32 = 2;
5pub const JS_PROP_ENUMERABLE: u32 = 4;
6pub const JS_PROP_C_W_E: u32 = 7;
7pub const JS_PROP_LENGTH: u32 = 8;
8pub const JS_PROP_TMASK: u32 = 48;
9pub const JS_PROP_NORMAL: u32 = 0;
10pub const JS_PROP_GETSET: u32 = 16;
11pub const JS_PROP_VARREF: u32 = 32;
12pub const JS_PROP_AUTOINIT: u32 = 48;
13pub const JS_PROP_HAS_SHIFT: u32 = 8;
14pub const JS_PROP_HAS_CONFIGURABLE: u32 = 256;
15pub const JS_PROP_HAS_WRITABLE: u32 = 512;
16pub const JS_PROP_HAS_ENUMERABLE: u32 = 1024;
17pub const JS_PROP_HAS_GET: u32 = 2048;
18pub const JS_PROP_HAS_SET: u32 = 4096;
19pub const JS_PROP_HAS_VALUE: u32 = 8192;
20pub const JS_PROP_THROW: u32 = 16384;
21pub const JS_PROP_THROW_STRICT: u32 = 32768;
22pub const JS_PROP_NO_ADD: u32 = 65536;
23pub const JS_PROP_NO_EXOTIC: u32 = 131072;
24pub const JS_DEFAULT_STACK_SIZE: u32 = 262144;
25pub const JS_EVAL_TYPE_GLOBAL: u32 = 0;
26pub const JS_EVAL_TYPE_MODULE: u32 = 1;
27pub const JS_EVAL_TYPE_DIRECT: u32 = 2;
28pub const JS_EVAL_TYPE_INDIRECT: u32 = 3;
29pub const JS_EVAL_TYPE_MASK: u32 = 3;
30pub const JS_EVAL_FLAG_STRICT: u32 = 8;
31pub const JS_EVAL_FLAG_STRIP: u32 = 16;
32pub const JS_EVAL_FLAG_COMPILE_ONLY: u32 = 32;
33pub const JS_GPN_STRING_MASK: u32 = 1;
34pub const JS_GPN_SYMBOL_MASK: u32 = 2;
35pub const JS_GPN_PRIVATE_MASK: u32 = 4;
36pub const JS_GPN_ENUM_ONLY: u32 = 16;
37pub const JS_GPN_SET_ENUM: u32 = 32;
38pub const JS_EVAL_BINARY_LOAD_ONLY: u32 = 1;
39pub const JS_WRITE_OBJ_BYTECODE: u32 = 1;
40pub const JS_WRITE_OBJ_BSWAP: u32 = 2;
41pub const JS_READ_OBJ_BYTECODE: u32 = 1;
42pub const JS_READ_OBJ_ROM_DATA: u32 = 2;
43pub const JS_DEF_CFUNC: u32 = 0;
44pub const JS_DEF_CGETSET: u32 = 1;
45pub const JS_DEF_CGETSET_MAGIC: u32 = 2;
46pub const JS_DEF_PROP_STRING: u32 = 3;
47pub const JS_DEF_PROP_INT32: u32 = 4;
48pub const JS_DEF_PROP_INT64: u32 = 5;
49pub const JS_DEF_PROP_DOUBLE: u32 = 6;
50pub const JS_DEF_PROP_UNDEFINED: u32 = 7;
51pub const JS_DEF_OBJECT: u32 = 8;
52pub const JS_DEF_ALIAS: u32 = 9;
53pub type FILE = [u64; 19usize];
54#[repr(C)]
55#[derive(Debug, Copy, Clone)]
56pub struct JSRuntime {
57    _unused: [u8; 0],
58}
59#[repr(C)]
60#[derive(Debug, Copy, Clone)]
61pub struct JSContext {
62    _unused: [u8; 0],
63}
64#[repr(C)]
65#[derive(Debug, Copy, Clone)]
66pub struct JSObject {
67    _unused: [u8; 0],
68}
69#[repr(C)]
70#[derive(Debug, Copy, Clone)]
71pub struct JSClass {
72    _unused: [u8; 0],
73}
74pub type JSClassID = u32;
75pub type JSAtom = u32;
76pub mod _bindgen_ty_1 {
77    pub type Type = i32;
78    pub const JS_TAG_FIRST: Type = -10;
79    pub const JS_TAG_BIG_INT: Type = -10;
80    pub const JS_TAG_BIG_FLOAT: Type = -9;
81    pub const JS_TAG_SYMBOL: Type = -8;
82    pub const JS_TAG_STRING: Type = -7;
83    pub const JS_TAG_SHAPE: Type = -6;
84    pub const JS_TAG_ASYNC_FUNCTION: Type = -5;
85    pub const JS_TAG_VAR_REF: Type = -4;
86    pub const JS_TAG_MODULE: Type = -3;
87    pub const JS_TAG_FUNCTION_BYTECODE: Type = -2;
88    pub const JS_TAG_OBJECT: Type = -1;
89    pub const JS_TAG_INT: Type = 0;
90    pub const JS_TAG_BOOL: Type = 1;
91    pub const JS_TAG_NULL: Type = 2;
92    pub const JS_TAG_UNDEFINED: Type = 3;
93    pub const JS_TAG_UNINITIALIZED: Type = 4;
94    pub const JS_TAG_CATCH_OFFSET: Type = 5;
95    pub const JS_TAG_EXCEPTION: Type = 6;
96    pub const JS_TAG_FLOAT64: Type = 7;
97}
98#[repr(C)]
99#[derive(Debug, Copy, Clone)]
100pub struct JSRefCountHeader {
101    pub ref_count: ::std::os::raw::c_int,
102}
103#[test]
104fn bindgen_test_layout_JSRefCountHeader() {
105    assert_eq!(
106        ::std::mem::size_of::<JSRefCountHeader>(),
107        4usize,
108        concat!("Size of: ", stringify!(JSRefCountHeader))
109    );
110    assert_eq!(
111        ::std::mem::align_of::<JSRefCountHeader>(),
112        4usize,
113        concat!("Alignment of ", stringify!(JSRefCountHeader))
114    );
115    assert_eq!(
116        unsafe { &(*(::std::ptr::null::<JSRefCountHeader>())).ref_count as *const _ as usize },
117        0usize,
118        concat!(
119            "Offset of field: ",
120            stringify!(JSRefCountHeader),
121            "::",
122            stringify!(ref_count)
123        )
124    );
125}
126#[repr(C)]
127#[derive(Copy, Clone)]
128pub union JSValueUnion {
129    pub int32: i32,
130    pub float64: f64,
131    pub ptr: *mut ::std::os::raw::c_void,
132    _bindgen_union_align: u64,
133}
134#[test]
135fn bindgen_test_layout_JSValueUnion() {
136    assert_eq!(
137        ::std::mem::size_of::<JSValueUnion>(),
138        8usize,
139        concat!("Size of: ", stringify!(JSValueUnion))
140    );
141    assert_eq!(
142        ::std::mem::align_of::<JSValueUnion>(),
143        8usize,
144        concat!("Alignment of ", stringify!(JSValueUnion))
145    );
146    assert_eq!(
147        unsafe { &(*(::std::ptr::null::<JSValueUnion>())).int32 as *const _ as usize },
148        0usize,
149        concat!(
150            "Offset of field: ",
151            stringify!(JSValueUnion),
152            "::",
153            stringify!(int32)
154        )
155    );
156    assert_eq!(
157        unsafe { &(*(::std::ptr::null::<JSValueUnion>())).float64 as *const _ as usize },
158        0usize,
159        concat!(
160            "Offset of field: ",
161            stringify!(JSValueUnion),
162            "::",
163            stringify!(float64)
164        )
165    );
166    assert_eq!(
167        unsafe { &(*(::std::ptr::null::<JSValueUnion>())).ptr as *const _ as usize },
168        0usize,
169        concat!(
170            "Offset of field: ",
171            stringify!(JSValueUnion),
172            "::",
173            stringify!(ptr)
174        )
175    );
176}
177#[repr(C)]
178#[derive(Copy, Clone)]
179pub struct JSValue {
180    pub u: JSValueUnion,
181    pub tag: i64,
182}
183#[test]
184fn bindgen_test_layout_JSValue() {
185    assert_eq!(
186        ::std::mem::size_of::<JSValue>(),
187        16usize,
188        concat!("Size of: ", stringify!(JSValue))
189    );
190    assert_eq!(
191        ::std::mem::align_of::<JSValue>(),
192        8usize,
193        concat!("Alignment of ", stringify!(JSValue))
194    );
195    assert_eq!(
196        unsafe { &(*(::std::ptr::null::<JSValue>())).u as *const _ as usize },
197        0usize,
198        concat!(
199            "Offset of field: ",
200            stringify!(JSValue),
201            "::",
202            stringify!(u)
203        )
204    );
205    assert_eq!(
206        unsafe { &(*(::std::ptr::null::<JSValue>())).tag as *const _ as usize },
207        8usize,
208        concat!(
209            "Offset of field: ",
210            stringify!(JSValue),
211            "::",
212            stringify!(tag)
213        )
214    );
215}
216pub type JSCFunction = ::std::option::Option<
217    unsafe extern "C" fn(
218        ctx: *mut JSContext,
219        this_val: JSValue,
220        argc: ::std::os::raw::c_int,
221        argv: *mut JSValue,
222    ) -> JSValue,
223>;
224pub type JSCFunctionMagic = ::std::option::Option<
225    unsafe extern "C" fn(
226        ctx: *mut JSContext,
227        this_val: JSValue,
228        argc: ::std::os::raw::c_int,
229        argv: *mut JSValue,
230        magic: ::std::os::raw::c_int,
231    ) -> JSValue,
232>;
233pub type JSCFunctionData = ::std::option::Option<
234    unsafe extern "C" fn(
235        ctx: *mut JSContext,
236        this_val: JSValue,
237        argc: ::std::os::raw::c_int,
238        argv: *mut JSValue,
239        magic: ::std::os::raw::c_int,
240        func_data: *mut JSValue,
241    ) -> JSValue,
242>;
243#[repr(C)]
244pub struct JSMallocState {
245    pub malloc_count: usize,
246    pub malloc_size: usize,
247    pub malloc_limit: usize,
248    pub opaque: *mut ::std::os::raw::c_void,
249}
250#[test]
251fn bindgen_test_layout_JSMallocState() {
252    assert_eq!(
253        ::std::mem::size_of::<JSMallocState>(),
254        32usize,
255        concat!("Size of: ", stringify!(JSMallocState))
256    );
257    assert_eq!(
258        ::std::mem::align_of::<JSMallocState>(),
259        8usize,
260        concat!("Alignment of ", stringify!(JSMallocState))
261    );
262    assert_eq!(
263        unsafe { &(*(::std::ptr::null::<JSMallocState>())).malloc_count as *const _ as usize },
264        0usize,
265        concat!(
266            "Offset of field: ",
267            stringify!(JSMallocState),
268            "::",
269            stringify!(malloc_count)
270        )
271    );
272    assert_eq!(
273        unsafe { &(*(::std::ptr::null::<JSMallocState>())).malloc_size as *const _ as usize },
274        8usize,
275        concat!(
276            "Offset of field: ",
277            stringify!(JSMallocState),
278            "::",
279            stringify!(malloc_size)
280        )
281    );
282    assert_eq!(
283        unsafe { &(*(::std::ptr::null::<JSMallocState>())).malloc_limit as *const _ as usize },
284        16usize,
285        concat!(
286            "Offset of field: ",
287            stringify!(JSMallocState),
288            "::",
289            stringify!(malloc_limit)
290        )
291    );
292    assert_eq!(
293        unsafe { &(*(::std::ptr::null::<JSMallocState>())).opaque as *const _ as usize },
294        24usize,
295        concat!(
296            "Offset of field: ",
297            stringify!(JSMallocState),
298            "::",
299            stringify!(opaque)
300        )
301    );
302}
303#[repr(C)]
304#[derive(Debug, Copy, Clone)]
305pub struct JSMallocFunctions {
306    pub js_malloc: ::std::option::Option<
307        unsafe extern "C" fn(s: *mut JSMallocState, size: usize) -> *mut ::std::os::raw::c_void,
308    >,
309    pub js_free: ::std::option::Option<
310        unsafe extern "C" fn(s: *mut JSMallocState, ptr: *mut ::std::os::raw::c_void),
311    >,
312    pub js_realloc: ::std::option::Option<
313        unsafe extern "C" fn(
314            s: *mut JSMallocState,
315            ptr: *mut ::std::os::raw::c_void,
316            size: usize,
317        ) -> *mut ::std::os::raw::c_void,
318    >,
319    pub js_malloc_usable_size:
320        ::std::option::Option<unsafe extern "C" fn(ptr: *const ::std::os::raw::c_void) -> usize>,
321}
322#[test]
323fn bindgen_test_layout_JSMallocFunctions() {
324    assert_eq!(
325        ::std::mem::size_of::<JSMallocFunctions>(),
326        32usize,
327        concat!("Size of: ", stringify!(JSMallocFunctions))
328    );
329    assert_eq!(
330        ::std::mem::align_of::<JSMallocFunctions>(),
331        8usize,
332        concat!("Alignment of ", stringify!(JSMallocFunctions))
333    );
334    assert_eq!(
335        unsafe { &(*(::std::ptr::null::<JSMallocFunctions>())).js_malloc as *const _ as usize },
336        0usize,
337        concat!(
338            "Offset of field: ",
339            stringify!(JSMallocFunctions),
340            "::",
341            stringify!(js_malloc)
342        )
343    );
344    assert_eq!(
345        unsafe { &(*(::std::ptr::null::<JSMallocFunctions>())).js_free as *const _ as usize },
346        8usize,
347        concat!(
348            "Offset of field: ",
349            stringify!(JSMallocFunctions),
350            "::",
351            stringify!(js_free)
352        )
353    );
354    assert_eq!(
355        unsafe { &(*(::std::ptr::null::<JSMallocFunctions>())).js_realloc as *const _ as usize },
356        16usize,
357        concat!(
358            "Offset of field: ",
359            stringify!(JSMallocFunctions),
360            "::",
361            stringify!(js_realloc)
362        )
363    );
364    assert_eq!(
365        unsafe {
366            &(*(::std::ptr::null::<JSMallocFunctions>())).js_malloc_usable_size as *const _ as usize
367        },
368        24usize,
369        concat!(
370            "Offset of field: ",
371            stringify!(JSMallocFunctions),
372            "::",
373            stringify!(js_malloc_usable_size)
374        )
375    );
376}
377extern "C" {
378    pub fn JS_NewRuntime() -> *mut JSRuntime;
379}
380extern "C" {
381    pub fn JS_SetRuntimeInfo(rt: *mut JSRuntime, info: *const ::std::os::raw::c_char);
382}
383extern "C" {
384    pub fn JS_SetMemoryLimit(rt: *mut JSRuntime, limit: usize);
385}
386extern "C" {
387    pub fn JS_SetGCThreshold(rt: *mut JSRuntime, gc_threshold: usize);
388}
389extern "C" {
390    pub fn JS_NewRuntime2(
391        mf: *const JSMallocFunctions,
392        opaque: *mut ::std::os::raw::c_void,
393    ) -> *mut JSRuntime;
394}
395extern "C" {
396    pub fn JS_FreeRuntime(rt: *mut JSRuntime);
397}
398pub type JS_MarkFunc =
399    ::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, val: JSValue)>;
400extern "C" {
401    pub fn JS_MarkValue(rt: *mut JSRuntime, val: JSValue, mark_func: JS_MarkFunc);
402}
403extern "C" {
404    pub fn JS_RunGC(rt: *mut JSRuntime);
405}
406extern "C" {
407    pub fn JS_IsLiveObject(rt: *mut JSRuntime, obj: JSValue) -> ::std::os::raw::c_int;
408}
409extern "C" {
410    pub fn JS_IsInGCSweep(rt: *mut JSRuntime) -> ::std::os::raw::c_int;
411}
412extern "C" {
413    pub fn JS_NewContext(rt: *mut JSRuntime) -> *mut JSContext;
414}
415extern "C" {
416    pub fn JS_FreeContext(s: *mut JSContext);
417}
418extern "C" {
419    pub fn JS_GetContextOpaque(ctx: *mut JSContext) -> *mut ::std::os::raw::c_void;
420}
421extern "C" {
422    pub fn JS_SetContextOpaque(ctx: *mut JSContext, opaque: *mut ::std::os::raw::c_void);
423}
424extern "C" {
425    pub fn JS_GetRuntime(ctx: *mut JSContext) -> *mut JSRuntime;
426}
427extern "C" {
428    pub fn JS_SetMaxStackSize(ctx: *mut JSContext, stack_size: usize);
429}
430extern "C" {
431    pub fn JS_SetClassProto(ctx: *mut JSContext, class_id: JSClassID, obj: JSValue);
432}
433extern "C" {
434    pub fn JS_GetClassProto(ctx: *mut JSContext, class_id: JSClassID) -> JSValue;
435}
436extern "C" {
437    pub fn JS_NewContextRaw(rt: *mut JSRuntime) -> *mut JSContext;
438}
439extern "C" {
440    pub fn JS_AddIntrinsicBaseObjects(ctx: *mut JSContext);
441}
442extern "C" {
443    pub fn JS_AddIntrinsicDate(ctx: *mut JSContext);
444}
445extern "C" {
446    pub fn JS_AddIntrinsicEval(ctx: *mut JSContext);
447}
448extern "C" {
449    pub fn JS_AddIntrinsicStringNormalize(ctx: *mut JSContext);
450}
451extern "C" {
452    pub fn JS_AddIntrinsicRegExpCompiler(ctx: *mut JSContext);
453}
454extern "C" {
455    pub fn JS_AddIntrinsicRegExp(ctx: *mut JSContext);
456}
457extern "C" {
458    pub fn JS_AddIntrinsicJSON(ctx: *mut JSContext);
459}
460extern "C" {
461    pub fn JS_AddIntrinsicProxy(ctx: *mut JSContext);
462}
463extern "C" {
464    pub fn JS_AddIntrinsicMapSet(ctx: *mut JSContext);
465}
466extern "C" {
467    pub fn JS_AddIntrinsicTypedArrays(ctx: *mut JSContext);
468}
469extern "C" {
470    pub fn JS_AddIntrinsicPromise(ctx: *mut JSContext);
471}
472extern "C" {
473    pub fn js_string_codePointRange(
474        ctx: *mut JSContext,
475        this_val: JSValue,
476        argc: ::std::os::raw::c_int,
477        argv: *mut JSValue,
478    ) -> JSValue;
479}
480extern "C" {
481    pub fn js_malloc_rt(rt: *mut JSRuntime, size: usize) -> *mut ::std::os::raw::c_void;
482}
483extern "C" {
484    pub fn js_free_rt(rt: *mut JSRuntime, ptr: *mut ::std::os::raw::c_void);
485}
486extern "C" {
487    pub fn js_realloc_rt(
488        rt: *mut JSRuntime,
489        ptr: *mut ::std::os::raw::c_void,
490        size: usize,
491    ) -> *mut ::std::os::raw::c_void;
492}
493extern "C" {
494    pub fn js_malloc_usable_size_rt(
495        rt: *mut JSRuntime,
496        ptr: *const ::std::os::raw::c_void,
497    ) -> usize;
498}
499extern "C" {
500    pub fn js_mallocz_rt(rt: *mut JSRuntime, size: usize) -> *mut ::std::os::raw::c_void;
501}
502extern "C" {
503    pub fn js_malloc(ctx: *mut JSContext, size: usize) -> *mut ::std::os::raw::c_void;
504}
505extern "C" {
506    pub fn js_free(ctx: *mut JSContext, ptr: *mut ::std::os::raw::c_void);
507}
508extern "C" {
509    pub fn js_realloc(
510        ctx: *mut JSContext,
511        ptr: *mut ::std::os::raw::c_void,
512        size: usize,
513    ) -> *mut ::std::os::raw::c_void;
514}
515extern "C" {
516    pub fn js_malloc_usable_size(ctx: *mut JSContext, ptr: *const ::std::os::raw::c_void) -> usize;
517}
518extern "C" {
519    pub fn js_realloc2(
520        ctx: *mut JSContext,
521        ptr: *mut ::std::os::raw::c_void,
522        size: usize,
523        pslack: *mut usize,
524    ) -> *mut ::std::os::raw::c_void;
525}
526extern "C" {
527    pub fn js_mallocz(ctx: *mut JSContext, size: usize) -> *mut ::std::os::raw::c_void;
528}
529extern "C" {
530    pub fn js_strdup(
531        ctx: *mut JSContext,
532        str: *const ::std::os::raw::c_char,
533    ) -> *mut ::std::os::raw::c_char;
534}
535extern "C" {
536    pub fn js_strndup(
537        ctx: *mut JSContext,
538        s: *const ::std::os::raw::c_char,
539        n: usize,
540    ) -> *mut ::std::os::raw::c_char;
541}
542#[repr(C)]
543#[derive(Debug, Copy, Clone)]
544pub struct JSMemoryUsage {
545    pub malloc_size: i64,
546    pub malloc_limit: i64,
547    pub memory_used_size: i64,
548    pub malloc_count: i64,
549    pub memory_used_count: i64,
550    pub atom_count: i64,
551    pub atom_size: i64,
552    pub str_count: i64,
553    pub str_size: i64,
554    pub obj_count: i64,
555    pub obj_size: i64,
556    pub prop_count: i64,
557    pub prop_size: i64,
558    pub shape_count: i64,
559    pub shape_size: i64,
560    pub js_func_count: i64,
561    pub js_func_size: i64,
562    pub js_func_code_size: i64,
563    pub js_func_pc2line_count: i64,
564    pub js_func_pc2line_size: i64,
565    pub c_func_count: i64,
566    pub array_count: i64,
567    pub fast_array_count: i64,
568    pub fast_array_elements: i64,
569    pub binary_object_count: i64,
570    pub binary_object_size: i64,
571}
572#[test]
573fn bindgen_test_layout_JSMemoryUsage() {
574    assert_eq!(
575        ::std::mem::size_of::<JSMemoryUsage>(),
576        208usize,
577        concat!("Size of: ", stringify!(JSMemoryUsage))
578    );
579    assert_eq!(
580        ::std::mem::align_of::<JSMemoryUsage>(),
581        8usize,
582        concat!("Alignment of ", stringify!(JSMemoryUsage))
583    );
584    assert_eq!(
585        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).malloc_size as *const _ as usize },
586        0usize,
587        concat!(
588            "Offset of field: ",
589            stringify!(JSMemoryUsage),
590            "::",
591            stringify!(malloc_size)
592        )
593    );
594    assert_eq!(
595        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).malloc_limit as *const _ as usize },
596        8usize,
597        concat!(
598            "Offset of field: ",
599            stringify!(JSMemoryUsage),
600            "::",
601            stringify!(malloc_limit)
602        )
603    );
604    assert_eq!(
605        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).memory_used_size as *const _ as usize },
606        16usize,
607        concat!(
608            "Offset of field: ",
609            stringify!(JSMemoryUsage),
610            "::",
611            stringify!(memory_used_size)
612        )
613    );
614    assert_eq!(
615        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).malloc_count as *const _ as usize },
616        24usize,
617        concat!(
618            "Offset of field: ",
619            stringify!(JSMemoryUsage),
620            "::",
621            stringify!(malloc_count)
622        )
623    );
624    assert_eq!(
625        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).memory_used_count as *const _ as usize },
626        32usize,
627        concat!(
628            "Offset of field: ",
629            stringify!(JSMemoryUsage),
630            "::",
631            stringify!(memory_used_count)
632        )
633    );
634    assert_eq!(
635        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).atom_count as *const _ as usize },
636        40usize,
637        concat!(
638            "Offset of field: ",
639            stringify!(JSMemoryUsage),
640            "::",
641            stringify!(atom_count)
642        )
643    );
644    assert_eq!(
645        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).atom_size as *const _ as usize },
646        48usize,
647        concat!(
648            "Offset of field: ",
649            stringify!(JSMemoryUsage),
650            "::",
651            stringify!(atom_size)
652        )
653    );
654    assert_eq!(
655        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).str_count as *const _ as usize },
656        56usize,
657        concat!(
658            "Offset of field: ",
659            stringify!(JSMemoryUsage),
660            "::",
661            stringify!(str_count)
662        )
663    );
664    assert_eq!(
665        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).str_size as *const _ as usize },
666        64usize,
667        concat!(
668            "Offset of field: ",
669            stringify!(JSMemoryUsage),
670            "::",
671            stringify!(str_size)
672        )
673    );
674    assert_eq!(
675        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).obj_count as *const _ as usize },
676        72usize,
677        concat!(
678            "Offset of field: ",
679            stringify!(JSMemoryUsage),
680            "::",
681            stringify!(obj_count)
682        )
683    );
684    assert_eq!(
685        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).obj_size as *const _ as usize },
686        80usize,
687        concat!(
688            "Offset of field: ",
689            stringify!(JSMemoryUsage),
690            "::",
691            stringify!(obj_size)
692        )
693    );
694    assert_eq!(
695        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).prop_count as *const _ as usize },
696        88usize,
697        concat!(
698            "Offset of field: ",
699            stringify!(JSMemoryUsage),
700            "::",
701            stringify!(prop_count)
702        )
703    );
704    assert_eq!(
705        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).prop_size as *const _ as usize },
706        96usize,
707        concat!(
708            "Offset of field: ",
709            stringify!(JSMemoryUsage),
710            "::",
711            stringify!(prop_size)
712        )
713    );
714    assert_eq!(
715        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).shape_count as *const _ as usize },
716        104usize,
717        concat!(
718            "Offset of field: ",
719            stringify!(JSMemoryUsage),
720            "::",
721            stringify!(shape_count)
722        )
723    );
724    assert_eq!(
725        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).shape_size as *const _ as usize },
726        112usize,
727        concat!(
728            "Offset of field: ",
729            stringify!(JSMemoryUsage),
730            "::",
731            stringify!(shape_size)
732        )
733    );
734    assert_eq!(
735        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).js_func_count as *const _ as usize },
736        120usize,
737        concat!(
738            "Offset of field: ",
739            stringify!(JSMemoryUsage),
740            "::",
741            stringify!(js_func_count)
742        )
743    );
744    assert_eq!(
745        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).js_func_size as *const _ as usize },
746        128usize,
747        concat!(
748            "Offset of field: ",
749            stringify!(JSMemoryUsage),
750            "::",
751            stringify!(js_func_size)
752        )
753    );
754    assert_eq!(
755        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).js_func_code_size as *const _ as usize },
756        136usize,
757        concat!(
758            "Offset of field: ",
759            stringify!(JSMemoryUsage),
760            "::",
761            stringify!(js_func_code_size)
762        )
763    );
764    assert_eq!(
765        unsafe {
766            &(*(::std::ptr::null::<JSMemoryUsage>())).js_func_pc2line_count as *const _ as usize
767        },
768        144usize,
769        concat!(
770            "Offset of field: ",
771            stringify!(JSMemoryUsage),
772            "::",
773            stringify!(js_func_pc2line_count)
774        )
775    );
776    assert_eq!(
777        unsafe {
778            &(*(::std::ptr::null::<JSMemoryUsage>())).js_func_pc2line_size as *const _ as usize
779        },
780        152usize,
781        concat!(
782            "Offset of field: ",
783            stringify!(JSMemoryUsage),
784            "::",
785            stringify!(js_func_pc2line_size)
786        )
787    );
788    assert_eq!(
789        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).c_func_count as *const _ as usize },
790        160usize,
791        concat!(
792            "Offset of field: ",
793            stringify!(JSMemoryUsage),
794            "::",
795            stringify!(c_func_count)
796        )
797    );
798    assert_eq!(
799        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).array_count as *const _ as usize },
800        168usize,
801        concat!(
802            "Offset of field: ",
803            stringify!(JSMemoryUsage),
804            "::",
805            stringify!(array_count)
806        )
807    );
808    assert_eq!(
809        unsafe { &(*(::std::ptr::null::<JSMemoryUsage>())).fast_array_count as *const _ as usize },
810        176usize,
811        concat!(
812            "Offset of field: ",
813            stringify!(JSMemoryUsage),
814            "::",
815            stringify!(fast_array_count)
816        )
817    );
818    assert_eq!(
819        unsafe {
820            &(*(::std::ptr::null::<JSMemoryUsage>())).fast_array_elements as *const _ as usize
821        },
822        184usize,
823        concat!(
824            "Offset of field: ",
825            stringify!(JSMemoryUsage),
826            "::",
827            stringify!(fast_array_elements)
828        )
829    );
830    assert_eq!(
831        unsafe {
832            &(*(::std::ptr::null::<JSMemoryUsage>())).binary_object_count as *const _ as usize
833        },
834        192usize,
835        concat!(
836            "Offset of field: ",
837            stringify!(JSMemoryUsage),
838            "::",
839            stringify!(binary_object_count)
840        )
841    );
842    assert_eq!(
843        unsafe {
844            &(*(::std::ptr::null::<JSMemoryUsage>())).binary_object_size as *const _ as usize
845        },
846        200usize,
847        concat!(
848            "Offset of field: ",
849            stringify!(JSMemoryUsage),
850            "::",
851            stringify!(binary_object_size)
852        )
853    );
854}
855extern "C" {
856    pub fn JS_ComputeMemoryUsage(rt: *mut JSRuntime, s: *mut JSMemoryUsage);
857}
858extern "C" {
859    pub fn JS_DumpMemoryUsage(fp: *mut FILE, s: *const JSMemoryUsage, rt: *mut JSRuntime);
860}
861extern "C" {
862    pub fn JS_NewAtomLen(
863        ctx: *mut JSContext,
864        str: *const ::std::os::raw::c_char,
865        len: usize,
866    ) -> JSAtom;
867}
868extern "C" {
869    pub fn JS_NewAtom(ctx: *mut JSContext, str: *const ::std::os::raw::c_char) -> JSAtom;
870}
871extern "C" {
872    pub fn JS_NewAtomUInt32(ctx: *mut JSContext, n: u32) -> JSAtom;
873}
874extern "C" {
875    pub fn JS_DupAtom(ctx: *mut JSContext, v: JSAtom) -> JSAtom;
876}
877extern "C" {
878    pub fn JS_FreeAtom(ctx: *mut JSContext, v: JSAtom);
879}
880extern "C" {
881    pub fn JS_FreeAtomRT(rt: *mut JSRuntime, v: JSAtom);
882}
883extern "C" {
884    pub fn JS_AtomToValue(ctx: *mut JSContext, atom: JSAtom) -> JSValue;
885}
886extern "C" {
887    pub fn JS_AtomToString(ctx: *mut JSContext, atom: JSAtom) -> JSValue;
888}
889extern "C" {
890    pub fn JS_AtomToCString(ctx: *mut JSContext, atom: JSAtom) -> *const ::std::os::raw::c_char;
891}
892#[repr(C)]
893#[derive(Debug, Copy, Clone)]
894pub struct JSPropertyEnum {
895    pub is_enumerable: ::std::os::raw::c_int,
896    pub atom: JSAtom,
897}
898#[test]
899fn bindgen_test_layout_JSPropertyEnum() {
900    assert_eq!(
901        ::std::mem::size_of::<JSPropertyEnum>(),
902        8usize,
903        concat!("Size of: ", stringify!(JSPropertyEnum))
904    );
905    assert_eq!(
906        ::std::mem::align_of::<JSPropertyEnum>(),
907        4usize,
908        concat!("Alignment of ", stringify!(JSPropertyEnum))
909    );
910    assert_eq!(
911        unsafe { &(*(::std::ptr::null::<JSPropertyEnum>())).is_enumerable as *const _ as usize },
912        0usize,
913        concat!(
914            "Offset of field: ",
915            stringify!(JSPropertyEnum),
916            "::",
917            stringify!(is_enumerable)
918        )
919    );
920    assert_eq!(
921        unsafe { &(*(::std::ptr::null::<JSPropertyEnum>())).atom as *const _ as usize },
922        4usize,
923        concat!(
924            "Offset of field: ",
925            stringify!(JSPropertyEnum),
926            "::",
927            stringify!(atom)
928        )
929    );
930}
931#[repr(C)]
932#[derive(Copy, Clone)]
933pub struct JSPropertyDescriptor {
934    pub flags: ::std::os::raw::c_int,
935    pub value: JSValue,
936    pub getter: JSValue,
937    pub setter: JSValue,
938}
939#[test]
940fn bindgen_test_layout_JSPropertyDescriptor() {
941    assert_eq!(
942        ::std::mem::size_of::<JSPropertyDescriptor>(),
943        56usize,
944        concat!("Size of: ", stringify!(JSPropertyDescriptor))
945    );
946    assert_eq!(
947        ::std::mem::align_of::<JSPropertyDescriptor>(),
948        8usize,
949        concat!("Alignment of ", stringify!(JSPropertyDescriptor))
950    );
951    assert_eq!(
952        unsafe { &(*(::std::ptr::null::<JSPropertyDescriptor>())).flags as *const _ as usize },
953        0usize,
954        concat!(
955            "Offset of field: ",
956            stringify!(JSPropertyDescriptor),
957            "::",
958            stringify!(flags)
959        )
960    );
961    assert_eq!(
962        unsafe { &(*(::std::ptr::null::<JSPropertyDescriptor>())).value as *const _ as usize },
963        8usize,
964        concat!(
965            "Offset of field: ",
966            stringify!(JSPropertyDescriptor),
967            "::",
968            stringify!(value)
969        )
970    );
971    assert_eq!(
972        unsafe { &(*(::std::ptr::null::<JSPropertyDescriptor>())).getter as *const _ as usize },
973        24usize,
974        concat!(
975            "Offset of field: ",
976            stringify!(JSPropertyDescriptor),
977            "::",
978            stringify!(getter)
979        )
980    );
981    assert_eq!(
982        unsafe { &(*(::std::ptr::null::<JSPropertyDescriptor>())).setter as *const _ as usize },
983        40usize,
984        concat!(
985            "Offset of field: ",
986            stringify!(JSPropertyDescriptor),
987            "::",
988            stringify!(setter)
989        )
990    );
991}
992#[repr(C)]
993#[derive(Debug, Copy, Clone)]
994pub struct JSClassExoticMethods {
995    pub get_own_property: ::std::option::Option<
996        unsafe extern "C" fn(
997            ctx: *mut JSContext,
998            desc: *mut JSPropertyDescriptor,
999            obj: JSValue,
1000            prop: JSAtom,
1001        ) -> ::std::os::raw::c_int,
1002    >,
1003    pub get_own_property_names: ::std::option::Option<
1004        unsafe extern "C" fn(
1005            ctx: *mut JSContext,
1006            ptab: *mut *mut JSPropertyEnum,
1007            plen: *mut u32,
1008            obj: JSValue,
1009        ) -> ::std::os::raw::c_int,
1010    >,
1011    pub delete_property: ::std::option::Option<
1012        unsafe extern "C" fn(
1013            ctx: *mut JSContext,
1014            obj: JSValue,
1015            prop: JSAtom,
1016        ) -> ::std::os::raw::c_int,
1017    >,
1018    pub define_own_property: ::std::option::Option<
1019        unsafe extern "C" fn(
1020            ctx: *mut JSContext,
1021            this_obj: JSValue,
1022            prop: JSAtom,
1023            val: JSValue,
1024            getter: JSValue,
1025            setter: JSValue,
1026            flags: ::std::os::raw::c_int,
1027        ) -> ::std::os::raw::c_int,
1028    >,
1029    pub has_property: ::std::option::Option<
1030        unsafe extern "C" fn(
1031            ctx: *mut JSContext,
1032            obj: JSValue,
1033            atom: JSAtom,
1034        ) -> ::std::os::raw::c_int,
1035    >,
1036    pub get_property: ::std::option::Option<
1037        unsafe extern "C" fn(
1038            ctx: *mut JSContext,
1039            obj: JSValue,
1040            atom: JSAtom,
1041            receiver: JSValue,
1042        ) -> JSValue,
1043    >,
1044    pub set_property: ::std::option::Option<
1045        unsafe extern "C" fn(
1046            ctx: *mut JSContext,
1047            obj: JSValue,
1048            atom: JSAtom,
1049            value: JSValue,
1050            receiver: JSValue,
1051            flags: ::std::os::raw::c_int,
1052        ) -> ::std::os::raw::c_int,
1053    >,
1054}
1055#[test]
1056fn bindgen_test_layout_JSClassExoticMethods() {
1057    assert_eq!(
1058        ::std::mem::size_of::<JSClassExoticMethods>(),
1059        56usize,
1060        concat!("Size of: ", stringify!(JSClassExoticMethods))
1061    );
1062    assert_eq!(
1063        ::std::mem::align_of::<JSClassExoticMethods>(),
1064        8usize,
1065        concat!("Alignment of ", stringify!(JSClassExoticMethods))
1066    );
1067    assert_eq!(
1068        unsafe {
1069            &(*(::std::ptr::null::<JSClassExoticMethods>())).get_own_property as *const _ as usize
1070        },
1071        0usize,
1072        concat!(
1073            "Offset of field: ",
1074            stringify!(JSClassExoticMethods),
1075            "::",
1076            stringify!(get_own_property)
1077        )
1078    );
1079    assert_eq!(
1080        unsafe {
1081            &(*(::std::ptr::null::<JSClassExoticMethods>())).get_own_property_names as *const _
1082                as usize
1083        },
1084        8usize,
1085        concat!(
1086            "Offset of field: ",
1087            stringify!(JSClassExoticMethods),
1088            "::",
1089            stringify!(get_own_property_names)
1090        )
1091    );
1092    assert_eq!(
1093        unsafe {
1094            &(*(::std::ptr::null::<JSClassExoticMethods>())).delete_property as *const _ as usize
1095        },
1096        16usize,
1097        concat!(
1098            "Offset of field: ",
1099            stringify!(JSClassExoticMethods),
1100            "::",
1101            stringify!(delete_property)
1102        )
1103    );
1104    assert_eq!(
1105        unsafe {
1106            &(*(::std::ptr::null::<JSClassExoticMethods>())).define_own_property as *const _
1107                as usize
1108        },
1109        24usize,
1110        concat!(
1111            "Offset of field: ",
1112            stringify!(JSClassExoticMethods),
1113            "::",
1114            stringify!(define_own_property)
1115        )
1116    );
1117    assert_eq!(
1118        unsafe {
1119            &(*(::std::ptr::null::<JSClassExoticMethods>())).has_property as *const _ as usize
1120        },
1121        32usize,
1122        concat!(
1123            "Offset of field: ",
1124            stringify!(JSClassExoticMethods),
1125            "::",
1126            stringify!(has_property)
1127        )
1128    );
1129    assert_eq!(
1130        unsafe {
1131            &(*(::std::ptr::null::<JSClassExoticMethods>())).get_property as *const _ as usize
1132        },
1133        40usize,
1134        concat!(
1135            "Offset of field: ",
1136            stringify!(JSClassExoticMethods),
1137            "::",
1138            stringify!(get_property)
1139        )
1140    );
1141    assert_eq!(
1142        unsafe {
1143            &(*(::std::ptr::null::<JSClassExoticMethods>())).set_property as *const _ as usize
1144        },
1145        48usize,
1146        concat!(
1147            "Offset of field: ",
1148            stringify!(JSClassExoticMethods),
1149            "::",
1150            stringify!(set_property)
1151        )
1152    );
1153}
1154pub type JSClassFinalizer =
1155    ::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, val: JSValue)>;
1156pub type JSClassGCMark = ::std::option::Option<
1157    unsafe extern "C" fn(rt: *mut JSRuntime, val: JSValue, mark_func: JS_MarkFunc),
1158>;
1159pub type JSClassCall = ::std::option::Option<
1160    unsafe extern "C" fn(
1161        ctx: *mut JSContext,
1162        func_obj: JSValue,
1163        this_val: JSValue,
1164        argc: ::std::os::raw::c_int,
1165        argv: *mut JSValue,
1166    ) -> JSValue,
1167>;
1168#[repr(C)]
1169#[derive(Debug, Copy, Clone)]
1170pub struct JSClassDef {
1171    pub class_name: *const ::std::os::raw::c_char,
1172    pub finalizer: JSClassFinalizer,
1173    pub gc_mark: JSClassGCMark,
1174    pub call: JSClassCall,
1175    pub exotic: *mut JSClassExoticMethods,
1176}
1177#[test]
1178fn bindgen_test_layout_JSClassDef() {
1179    assert_eq!(
1180        ::std::mem::size_of::<JSClassDef>(),
1181        40usize,
1182        concat!("Size of: ", stringify!(JSClassDef))
1183    );
1184    assert_eq!(
1185        ::std::mem::align_of::<JSClassDef>(),
1186        8usize,
1187        concat!("Alignment of ", stringify!(JSClassDef))
1188    );
1189    assert_eq!(
1190        unsafe { &(*(::std::ptr::null::<JSClassDef>())).class_name as *const _ as usize },
1191        0usize,
1192        concat!(
1193            "Offset of field: ",
1194            stringify!(JSClassDef),
1195            "::",
1196            stringify!(class_name)
1197        )
1198    );
1199    assert_eq!(
1200        unsafe { &(*(::std::ptr::null::<JSClassDef>())).finalizer as *const _ as usize },
1201        8usize,
1202        concat!(
1203            "Offset of field: ",
1204            stringify!(JSClassDef),
1205            "::",
1206            stringify!(finalizer)
1207        )
1208    );
1209    assert_eq!(
1210        unsafe { &(*(::std::ptr::null::<JSClassDef>())).gc_mark as *const _ as usize },
1211        16usize,
1212        concat!(
1213            "Offset of field: ",
1214            stringify!(JSClassDef),
1215            "::",
1216            stringify!(gc_mark)
1217        )
1218    );
1219    assert_eq!(
1220        unsafe { &(*(::std::ptr::null::<JSClassDef>())).call as *const _ as usize },
1221        24usize,
1222        concat!(
1223            "Offset of field: ",
1224            stringify!(JSClassDef),
1225            "::",
1226            stringify!(call)
1227        )
1228    );
1229    assert_eq!(
1230        unsafe { &(*(::std::ptr::null::<JSClassDef>())).exotic as *const _ as usize },
1231        32usize,
1232        concat!(
1233            "Offset of field: ",
1234            stringify!(JSClassDef),
1235            "::",
1236            stringify!(exotic)
1237        )
1238    );
1239}
1240extern "C" {
1241    pub fn JS_NewClassID(pclass_id: *mut JSClassID) -> JSClassID;
1242}
1243extern "C" {
1244    pub fn JS_NewClass(
1245        rt: *mut JSRuntime,
1246        class_id: JSClassID,
1247        class_def: *const JSClassDef,
1248    ) -> ::std::os::raw::c_int;
1249}
1250extern "C" {
1251    pub fn JS_IsRegisteredClass(rt: *mut JSRuntime, class_id: JSClassID) -> ::std::os::raw::c_int;
1252}
1253extern "C" {
1254    pub fn JS_NewInt64(ctx: *mut JSContext, v: i64) -> JSValue;
1255}
1256extern "C" {
1257    pub fn JS_NewBigInt64(ctx: *mut JSContext, v: i64) -> JSValue;
1258}
1259extern "C" {
1260    pub fn JS_NewBigUint64(ctx: *mut JSContext, v: u64) -> JSValue;
1261}
1262extern "C" {
1263    pub fn JS_IsNumber(v: JSValue) -> ::std::os::raw::c_int;
1264}
1265extern "C" {
1266    pub fn JS_Throw(ctx: *mut JSContext, obj: JSValue) -> JSValue;
1267}
1268extern "C" {
1269    pub fn JS_GetException(ctx: *mut JSContext) -> JSValue;
1270}
1271extern "C" {
1272    pub fn JS_IsError(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
1273}
1274extern "C" {
1275    pub fn JS_EnableIsErrorProperty(ctx: *mut JSContext, enable: ::std::os::raw::c_int);
1276}
1277extern "C" {
1278    pub fn JS_ResetUncatchableError(ctx: *mut JSContext);
1279}
1280extern "C" {
1281    pub fn JS_NewError(ctx: *mut JSContext) -> JSValue;
1282}
1283extern "C" {
1284    pub fn JS_ThrowSyntaxError(
1285        ctx: *mut JSContext,
1286        fmt: *const ::std::os::raw::c_char,
1287        ...
1288    ) -> JSValue;
1289}
1290extern "C" {
1291    pub fn JS_ThrowTypeError(
1292        ctx: *mut JSContext,
1293        fmt: *const ::std::os::raw::c_char,
1294        ...
1295    ) -> JSValue;
1296}
1297extern "C" {
1298    pub fn JS_ThrowReferenceError(
1299        ctx: *mut JSContext,
1300        fmt: *const ::std::os::raw::c_char,
1301        ...
1302    ) -> JSValue;
1303}
1304extern "C" {
1305    pub fn JS_ThrowRangeError(
1306        ctx: *mut JSContext,
1307        fmt: *const ::std::os::raw::c_char,
1308        ...
1309    ) -> JSValue;
1310}
1311extern "C" {
1312    pub fn JS_ThrowInternalError(
1313        ctx: *mut JSContext,
1314        fmt: *const ::std::os::raw::c_char,
1315        ...
1316    ) -> JSValue;
1317}
1318extern "C" {
1319    pub fn JS_ThrowOutOfMemory(ctx: *mut JSContext) -> JSValue;
1320}
1321extern "C" {
1322    pub fn __JS_FreeValue(ctx: *mut JSContext, v: JSValue);
1323}
1324extern "C" {
1325    pub fn __JS_FreeValueRT(rt: *mut JSRuntime, v: JSValue);
1326}
1327extern "C" {
1328    pub fn JS_ToBool(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
1329}
1330extern "C" {
1331    pub fn JS_ToInt32(ctx: *mut JSContext, pres: *mut i32, val: JSValue) -> ::std::os::raw::c_int;
1332}
1333extern "C" {
1334    pub fn JS_ToInt64(ctx: *mut JSContext, pres: *mut i64, val: JSValue) -> ::std::os::raw::c_int;
1335}
1336extern "C" {
1337    pub fn JS_ToIndex(ctx: *mut JSContext, plen: *mut u64, val: JSValue) -> ::std::os::raw::c_int;
1338}
1339extern "C" {
1340    pub fn JS_ToFloat64(ctx: *mut JSContext, pres: *mut f64, val: JSValue)
1341        -> ::std::os::raw::c_int;
1342}
1343extern "C" {
1344    pub fn JS_ToBigInt64(
1345        ctx: *mut JSContext,
1346        pres: *mut i64,
1347        val: JSValue,
1348    ) -> ::std::os::raw::c_int;
1349}
1350extern "C" {
1351    pub fn JS_NewStringLen(
1352        ctx: *mut JSContext,
1353        str1: *const ::std::os::raw::c_char,
1354        len1: usize,
1355    ) -> JSValue;
1356}
1357extern "C" {
1358    pub fn JS_NewString(ctx: *mut JSContext, str: *const ::std::os::raw::c_char) -> JSValue;
1359}
1360extern "C" {
1361    pub fn JS_NewAtomString(ctx: *mut JSContext, str: *const ::std::os::raw::c_char) -> JSValue;
1362}
1363extern "C" {
1364    pub fn JS_ToString(ctx: *mut JSContext, val: JSValue) -> JSValue;
1365}
1366extern "C" {
1367    pub fn JS_ToPropertyKey(ctx: *mut JSContext, val: JSValue) -> JSValue;
1368}
1369extern "C" {
1370    pub fn JS_ToCStringLen2(
1371        ctx: *mut JSContext,
1372        plen: *mut usize,
1373        val1: JSValue,
1374        cesu8: ::std::os::raw::c_int,
1375    ) -> *const ::std::os::raw::c_char;
1376}
1377extern "C" {
1378    pub fn JS_FreeCString(ctx: *mut JSContext, ptr: *const ::std::os::raw::c_char);
1379}
1380extern "C" {
1381    pub fn JS_NewObjectProtoClass(
1382        ctx: *mut JSContext,
1383        proto: JSValue,
1384        class_id: JSClassID,
1385    ) -> JSValue;
1386}
1387extern "C" {
1388    pub fn JS_NewObjectClass(ctx: *mut JSContext, class_id: ::std::os::raw::c_int) -> JSValue;
1389}
1390extern "C" {
1391    pub fn JS_NewObjectProto(ctx: *mut JSContext, proto: JSValue) -> JSValue;
1392}
1393extern "C" {
1394    pub fn JS_NewObject(ctx: *mut JSContext) -> JSValue;
1395}
1396extern "C" {
1397    pub fn JS_IsFunction(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
1398}
1399extern "C" {
1400    pub fn JS_IsConstructor(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
1401}
1402extern "C" {
1403    pub fn JS_NewArray(ctx: *mut JSContext) -> JSValue;
1404}
1405extern "C" {
1406    pub fn JS_IsArray(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
1407}
1408extern "C" {
1409    pub fn JS_GetPropertyInternal(
1410        ctx: *mut JSContext,
1411        obj: JSValue,
1412        prop: JSAtom,
1413        receiver: JSValue,
1414        throw_ref_error: ::std::os::raw::c_int,
1415    ) -> JSValue;
1416}
1417extern "C" {
1418    pub fn JS_GetPropertyStr(
1419        ctx: *mut JSContext,
1420        this_obj: JSValue,
1421        prop: *const ::std::os::raw::c_char,
1422    ) -> JSValue;
1423}
1424extern "C" {
1425    pub fn JS_GetPropertyUint32(ctx: *mut JSContext, this_obj: JSValue, idx: u32) -> JSValue;
1426}
1427extern "C" {
1428    pub fn JS_SetPropertyInternal(
1429        ctx: *mut JSContext,
1430        this_obj: JSValue,
1431        prop: JSAtom,
1432        val: JSValue,
1433        flags: ::std::os::raw::c_int,
1434    ) -> ::std::os::raw::c_int;
1435}
1436extern "C" {
1437    pub fn JS_SetPropertyUint32(
1438        ctx: *mut JSContext,
1439        this_obj: JSValue,
1440        idx: u32,
1441        val: JSValue,
1442    ) -> ::std::os::raw::c_int;
1443}
1444extern "C" {
1445    pub fn JS_SetPropertyInt64(
1446        ctx: *mut JSContext,
1447        this_obj: JSValue,
1448        idx: i64,
1449        val: JSValue,
1450    ) -> ::std::os::raw::c_int;
1451}
1452extern "C" {
1453    pub fn JS_SetPropertyStr(
1454        ctx: *mut JSContext,
1455        this_obj: JSValue,
1456        prop: *const ::std::os::raw::c_char,
1457        val: JSValue,
1458    ) -> ::std::os::raw::c_int;
1459}
1460extern "C" {
1461    pub fn JS_HasProperty(
1462        ctx: *mut JSContext,
1463        this_obj: JSValue,
1464        prop: JSAtom,
1465    ) -> ::std::os::raw::c_int;
1466}
1467extern "C" {
1468    pub fn JS_IsExtensible(ctx: *mut JSContext, obj: JSValue) -> ::std::os::raw::c_int;
1469}
1470extern "C" {
1471    pub fn JS_PreventExtensions(ctx: *mut JSContext, obj: JSValue) -> ::std::os::raw::c_int;
1472}
1473extern "C" {
1474    pub fn JS_DeleteProperty(
1475        ctx: *mut JSContext,
1476        obj: JSValue,
1477        prop: JSAtom,
1478        flags: ::std::os::raw::c_int,
1479    ) -> ::std::os::raw::c_int;
1480}
1481extern "C" {
1482    pub fn JS_SetPrototype(
1483        ctx: *mut JSContext,
1484        obj: JSValue,
1485        proto_val: JSValue,
1486    ) -> ::std::os::raw::c_int;
1487}
1488extern "C" {
1489    pub fn JS_GetPrototype(ctx: *mut JSContext, val: JSValue) -> JSValue;
1490}
1491extern "C" {
1492    pub fn JS_GetOwnPropertyNames(
1493        ctx: *mut JSContext,
1494        ptab: *mut *mut JSPropertyEnum,
1495        plen: *mut u32,
1496        obj: JSValue,
1497        flags: ::std::os::raw::c_int,
1498    ) -> ::std::os::raw::c_int;
1499}
1500extern "C" {
1501    pub fn JS_GetOwnProperty(
1502        ctx: *mut JSContext,
1503        desc: *mut JSPropertyDescriptor,
1504        obj: JSValue,
1505        prop: JSAtom,
1506    ) -> ::std::os::raw::c_int;
1507}
1508extern "C" {
1509    pub fn JS_ParseJSON(
1510        ctx: *mut JSContext,
1511        buf: *const ::std::os::raw::c_char,
1512        buf_len: usize,
1513        filename: *const ::std::os::raw::c_char,
1514    ) -> JSValue;
1515}
1516extern "C" {
1517    pub fn JS_Call(
1518        ctx: *mut JSContext,
1519        func_obj: JSValue,
1520        this_obj: JSValue,
1521        argc: ::std::os::raw::c_int,
1522        argv: *mut JSValue,
1523    ) -> JSValue;
1524}
1525extern "C" {
1526    pub fn JS_Invoke(
1527        ctx: *mut JSContext,
1528        this_val: JSValue,
1529        atom: JSAtom,
1530        argc: ::std::os::raw::c_int,
1531        argv: *mut JSValue,
1532    ) -> JSValue;
1533}
1534extern "C" {
1535    pub fn JS_CallConstructor(
1536        ctx: *mut JSContext,
1537        func_obj: JSValue,
1538        argc: ::std::os::raw::c_int,
1539        argv: *mut JSValue,
1540    ) -> JSValue;
1541}
1542extern "C" {
1543    pub fn JS_CallConstructor2(
1544        ctx: *mut JSContext,
1545        func_obj: JSValue,
1546        new_target: JSValue,
1547        argc: ::std::os::raw::c_int,
1548        argv: *mut JSValue,
1549    ) -> JSValue;
1550}
1551extern "C" {
1552    pub fn JS_DetectModule(
1553        input: *const ::std::os::raw::c_char,
1554        input_len: usize,
1555    ) -> ::std::os::raw::c_int;
1556}
1557extern "C" {
1558    pub fn JS_Eval(
1559        ctx: *mut JSContext,
1560        input: *const ::std::os::raw::c_char,
1561        input_len: usize,
1562        filename: *const ::std::os::raw::c_char,
1563        eval_flags: ::std::os::raw::c_int,
1564    ) -> JSValue;
1565}
1566extern "C" {
1567    pub fn JS_EvalBinary(
1568        ctx: *mut JSContext,
1569        buf: *const u8,
1570        buf_len: usize,
1571        flags: ::std::os::raw::c_int,
1572    ) -> JSValue;
1573}
1574extern "C" {
1575    pub fn JS_GetGlobalObject(ctx: *mut JSContext) -> JSValue;
1576}
1577extern "C" {
1578    pub fn JS_IsInstanceOf(
1579        ctx: *mut JSContext,
1580        val: JSValue,
1581        obj: JSValue,
1582    ) -> ::std::os::raw::c_int;
1583}
1584extern "C" {
1585    pub fn JS_DefineProperty(
1586        ctx: *mut JSContext,
1587        this_obj: JSValue,
1588        prop: JSAtom,
1589        val: JSValue,
1590        getter: JSValue,
1591        setter: JSValue,
1592        flags: ::std::os::raw::c_int,
1593    ) -> ::std::os::raw::c_int;
1594}
1595extern "C" {
1596    pub fn JS_DefinePropertyValue(
1597        ctx: *mut JSContext,
1598        this_obj: JSValue,
1599        prop: JSAtom,
1600        val: JSValue,
1601        flags: ::std::os::raw::c_int,
1602    ) -> ::std::os::raw::c_int;
1603}
1604extern "C" {
1605    pub fn JS_DefinePropertyValueUint32(
1606        ctx: *mut JSContext,
1607        this_obj: JSValue,
1608        idx: u32,
1609        val: JSValue,
1610        flags: ::std::os::raw::c_int,
1611    ) -> ::std::os::raw::c_int;
1612}
1613extern "C" {
1614    pub fn JS_DefinePropertyValueStr(
1615        ctx: *mut JSContext,
1616        this_obj: JSValue,
1617        prop: *const ::std::os::raw::c_char,
1618        val: JSValue,
1619        flags: ::std::os::raw::c_int,
1620    ) -> ::std::os::raw::c_int;
1621}
1622extern "C" {
1623    pub fn JS_DefinePropertyGetSet(
1624        ctx: *mut JSContext,
1625        this_obj: JSValue,
1626        prop: JSAtom,
1627        getter: JSValue,
1628        setter: JSValue,
1629        flags: ::std::os::raw::c_int,
1630    ) -> ::std::os::raw::c_int;
1631}
1632extern "C" {
1633    pub fn JS_SetOpaque(obj: JSValue, opaque: *mut ::std::os::raw::c_void);
1634}
1635extern "C" {
1636    pub fn JS_GetOpaque(obj: JSValue, class_id: JSClassID) -> *mut ::std::os::raw::c_void;
1637}
1638extern "C" {
1639    pub fn JS_GetOpaque2(
1640        ctx: *mut JSContext,
1641        obj: JSValue,
1642        class_id: JSClassID,
1643    ) -> *mut ::std::os::raw::c_void;
1644}
1645pub type JSFreeArrayBufferDataFunc = ::std::option::Option<
1646    unsafe extern "C" fn(
1647        rt: *mut JSRuntime,
1648        opaque: *mut ::std::os::raw::c_void,
1649        ptr: *mut ::std::os::raw::c_void,
1650    ),
1651>;
1652extern "C" {
1653    pub fn JS_NewArrayBuffer(
1654        ctx: *mut JSContext,
1655        buf: *mut u8,
1656        len: usize,
1657        free_func: JSFreeArrayBufferDataFunc,
1658        opaque: *mut ::std::os::raw::c_void,
1659        is_shared: ::std::os::raw::c_int,
1660    ) -> JSValue;
1661}
1662extern "C" {
1663    pub fn JS_NewArrayBufferCopy(ctx: *mut JSContext, buf: *const u8, len: usize) -> JSValue;
1664}
1665extern "C" {
1666    pub fn JS_DetachArrayBuffer(ctx: *mut JSContext, obj: JSValue);
1667}
1668extern "C" {
1669    pub fn JS_GetArrayBuffer(ctx: *mut JSContext, psize: *mut usize, obj: JSValue) -> *mut u8;
1670}
1671extern "C" {
1672    pub fn JS_NewPromiseCapability(ctx: *mut JSContext, resolving_funcs: *mut JSValue) -> JSValue;
1673}
1674pub type JSInterruptHandler = ::std::option::Option<
1675    unsafe extern "C" fn(
1676        rt: *mut JSRuntime,
1677        opaque: *mut ::std::os::raw::c_void,
1678    ) -> ::std::os::raw::c_int,
1679>;
1680extern "C" {
1681    pub fn JS_SetInterruptHandler(
1682        rt: *mut JSRuntime,
1683        cb: JSInterruptHandler,
1684        opaque: *mut ::std::os::raw::c_void,
1685    );
1686}
1687extern "C" {
1688    pub fn JS_SetCanBlock(rt: *mut JSRuntime, can_block: ::std::os::raw::c_int);
1689}
1690#[repr(C)]
1691#[derive(Debug, Copy, Clone)]
1692pub struct JSModuleDef {
1693    _unused: [u8; 0],
1694}
1695pub type JSModuleNormalizeFunc = ::std::option::Option<
1696    unsafe extern "C" fn(
1697        ctx: *mut JSContext,
1698        module_base_name: *const ::std::os::raw::c_char,
1699        module_name: *const ::std::os::raw::c_char,
1700        opaque: *mut ::std::os::raw::c_void,
1701    ) -> *mut ::std::os::raw::c_char,
1702>;
1703pub type JSModuleLoaderFunc = ::std::option::Option<
1704    unsafe extern "C" fn(
1705        ctx: *mut JSContext,
1706        module_name: *const ::std::os::raw::c_char,
1707        opaque: *mut ::std::os::raw::c_void,
1708    ) -> *mut JSModuleDef,
1709>;
1710extern "C" {
1711    pub fn JS_SetModuleLoaderFunc(
1712        rt: *mut JSRuntime,
1713        module_normalize: JSModuleNormalizeFunc,
1714        module_loader: JSModuleLoaderFunc,
1715        opaque: *mut ::std::os::raw::c_void,
1716    );
1717}
1718pub type JSJobFunc = ::std::option::Option<
1719    unsafe extern "C" fn(
1720        ctx: *mut JSContext,
1721        argc: ::std::os::raw::c_int,
1722        argv: *mut JSValue,
1723    ) -> JSValue,
1724>;
1725extern "C" {
1726    pub fn JS_EnqueueJob(
1727        ctx: *mut JSContext,
1728        job_func: JSJobFunc,
1729        argc: ::std::os::raw::c_int,
1730        argv: *mut JSValue,
1731    ) -> ::std::os::raw::c_int;
1732}
1733extern "C" {
1734    pub fn JS_IsJobPending(rt: *mut JSRuntime) -> ::std::os::raw::c_int;
1735}
1736extern "C" {
1737    pub fn JS_ExecutePendingJob(
1738        rt: *mut JSRuntime,
1739        pctx: *mut *mut JSContext,
1740    ) -> ::std::os::raw::c_int;
1741}
1742extern "C" {
1743    pub fn JS_WriteObject(
1744        ctx: *mut JSContext,
1745        psize: *mut usize,
1746        obj: JSValue,
1747        flags: ::std::os::raw::c_int,
1748    ) -> *mut u8;
1749}
1750extern "C" {
1751    pub fn JS_ReadObject(
1752        ctx: *mut JSContext,
1753        buf: *const u8,
1754        buf_len: usize,
1755        flags: ::std::os::raw::c_int,
1756    ) -> JSValue;
1757}
1758extern "C" {
1759    pub fn JS_EvalFunction(ctx: *mut JSContext, fun_obj: JSValue, this_obj: JSValue) -> JSValue;
1760}
1761pub mod JSCFunctionEnum {
1762    pub type Type = u32;
1763    pub const JS_CFUNC_generic: Type = 0;
1764    pub const JS_CFUNC_generic_magic: Type = 1;
1765    pub const JS_CFUNC_constructor: Type = 2;
1766    pub const JS_CFUNC_constructor_magic: Type = 3;
1767    pub const JS_CFUNC_constructor_or_func: Type = 4;
1768    pub const JS_CFUNC_constructor_or_func_magic: Type = 5;
1769    pub const JS_CFUNC_f_f: Type = 6;
1770    pub const JS_CFUNC_f_f_f: Type = 7;
1771    pub const JS_CFUNC_getter: Type = 8;
1772    pub const JS_CFUNC_setter: Type = 9;
1773    pub const JS_CFUNC_getter_magic: Type = 10;
1774    pub const JS_CFUNC_setter_magic: Type = 11;
1775    pub const JS_CFUNC_iterator_next: Type = 12;
1776}
1777#[repr(C)]
1778#[derive(Copy, Clone)]
1779pub union JSCFunctionType {
1780    pub generic: JSCFunction,
1781    pub generic_magic: ::std::option::Option<
1782        unsafe extern "C" fn(
1783            ctx: *mut JSContext,
1784            this_val: JSValue,
1785            argc: ::std::os::raw::c_int,
1786            argv: *mut JSValue,
1787            magic: ::std::os::raw::c_int,
1788        ) -> JSValue,
1789    >,
1790    pub constructor: JSCFunction,
1791    pub constructor_magic: ::std::option::Option<
1792        unsafe extern "C" fn(
1793            ctx: *mut JSContext,
1794            new_target: JSValue,
1795            argc: ::std::os::raw::c_int,
1796            argv: *mut JSValue,
1797            magic: ::std::os::raw::c_int,
1798        ) -> JSValue,
1799    >,
1800    pub constructor_or_func: JSCFunction,
1801    pub f_f: ::std::option::Option<unsafe extern "C" fn(arg1: f64) -> f64>,
1802    pub f_f_f: ::std::option::Option<unsafe extern "C" fn(arg1: f64, arg2: f64) -> f64>,
1803    pub getter: ::std::option::Option<
1804        unsafe extern "C" fn(ctx: *mut JSContext, this_val: JSValue) -> JSValue,
1805    >,
1806    pub setter: ::std::option::Option<
1807        unsafe extern "C" fn(ctx: *mut JSContext, this_val: JSValue, val: JSValue) -> JSValue,
1808    >,
1809    pub getter_magic: ::std::option::Option<
1810        unsafe extern "C" fn(
1811            ctx: *mut JSContext,
1812            this_val: JSValue,
1813            magic: ::std::os::raw::c_int,
1814        ) -> JSValue,
1815    >,
1816    pub setter_magic: ::std::option::Option<
1817        unsafe extern "C" fn(
1818            ctx: *mut JSContext,
1819            this_val: JSValue,
1820            val: JSValue,
1821            magic: ::std::os::raw::c_int,
1822        ) -> JSValue,
1823    >,
1824    pub iterator_next: ::std::option::Option<
1825        unsafe extern "C" fn(
1826            ctx: *mut JSContext,
1827            this_val: JSValue,
1828            argc: ::std::os::raw::c_int,
1829            argv: *mut JSValue,
1830            pdone: *mut ::std::os::raw::c_int,
1831            magic: ::std::os::raw::c_int,
1832        ) -> JSValue,
1833    >,
1834    _bindgen_union_align: u64,
1835}
1836#[test]
1837fn bindgen_test_layout_JSCFunctionType() {
1838    assert_eq!(
1839        ::std::mem::size_of::<JSCFunctionType>(),
1840        8usize,
1841        concat!("Size of: ", stringify!(JSCFunctionType))
1842    );
1843    assert_eq!(
1844        ::std::mem::align_of::<JSCFunctionType>(),
1845        8usize,
1846        concat!("Alignment of ", stringify!(JSCFunctionType))
1847    );
1848    assert_eq!(
1849        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).generic as *const _ as usize },
1850        0usize,
1851        concat!(
1852            "Offset of field: ",
1853            stringify!(JSCFunctionType),
1854            "::",
1855            stringify!(generic)
1856        )
1857    );
1858    assert_eq!(
1859        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).generic_magic as *const _ as usize },
1860        0usize,
1861        concat!(
1862            "Offset of field: ",
1863            stringify!(JSCFunctionType),
1864            "::",
1865            stringify!(generic_magic)
1866        )
1867    );
1868    assert_eq!(
1869        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).constructor as *const _ as usize },
1870        0usize,
1871        concat!(
1872            "Offset of field: ",
1873            stringify!(JSCFunctionType),
1874            "::",
1875            stringify!(constructor)
1876        )
1877    );
1878    assert_eq!(
1879        unsafe {
1880            &(*(::std::ptr::null::<JSCFunctionType>())).constructor_magic as *const _ as usize
1881        },
1882        0usize,
1883        concat!(
1884            "Offset of field: ",
1885            stringify!(JSCFunctionType),
1886            "::",
1887            stringify!(constructor_magic)
1888        )
1889    );
1890    assert_eq!(
1891        unsafe {
1892            &(*(::std::ptr::null::<JSCFunctionType>())).constructor_or_func as *const _ as usize
1893        },
1894        0usize,
1895        concat!(
1896            "Offset of field: ",
1897            stringify!(JSCFunctionType),
1898            "::",
1899            stringify!(constructor_or_func)
1900        )
1901    );
1902    assert_eq!(
1903        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).f_f as *const _ as usize },
1904        0usize,
1905        concat!(
1906            "Offset of field: ",
1907            stringify!(JSCFunctionType),
1908            "::",
1909            stringify!(f_f)
1910        )
1911    );
1912    assert_eq!(
1913        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).f_f_f as *const _ as usize },
1914        0usize,
1915        concat!(
1916            "Offset of field: ",
1917            stringify!(JSCFunctionType),
1918            "::",
1919            stringify!(f_f_f)
1920        )
1921    );
1922    assert_eq!(
1923        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).getter as *const _ as usize },
1924        0usize,
1925        concat!(
1926            "Offset of field: ",
1927            stringify!(JSCFunctionType),
1928            "::",
1929            stringify!(getter)
1930        )
1931    );
1932    assert_eq!(
1933        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).setter as *const _ as usize },
1934        0usize,
1935        concat!(
1936            "Offset of field: ",
1937            stringify!(JSCFunctionType),
1938            "::",
1939            stringify!(setter)
1940        )
1941    );
1942    assert_eq!(
1943        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).getter_magic as *const _ as usize },
1944        0usize,
1945        concat!(
1946            "Offset of field: ",
1947            stringify!(JSCFunctionType),
1948            "::",
1949            stringify!(getter_magic)
1950        )
1951    );
1952    assert_eq!(
1953        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).setter_magic as *const _ as usize },
1954        0usize,
1955        concat!(
1956            "Offset of field: ",
1957            stringify!(JSCFunctionType),
1958            "::",
1959            stringify!(setter_magic)
1960        )
1961    );
1962    assert_eq!(
1963        unsafe { &(*(::std::ptr::null::<JSCFunctionType>())).iterator_next as *const _ as usize },
1964        0usize,
1965        concat!(
1966            "Offset of field: ",
1967            stringify!(JSCFunctionType),
1968            "::",
1969            stringify!(iterator_next)
1970        )
1971    );
1972}
1973extern "C" {
1974    pub fn JS_NewCFunction2(
1975        ctx: *mut JSContext,
1976        func: JSCFunction,
1977        name: *const ::std::os::raw::c_char,
1978        length: ::std::os::raw::c_int,
1979        cproto: JSCFunctionEnum::Type,
1980        magic: ::std::os::raw::c_int,
1981    ) -> JSValue;
1982}
1983extern "C" {
1984    pub fn JS_NewCFunctionData(
1985        ctx: *mut JSContext,
1986        func: JSCFunctionData,
1987        length: ::std::os::raw::c_int,
1988        magic: ::std::os::raw::c_int,
1989        data_len: ::std::os::raw::c_int,
1990        data: *mut JSValue,
1991    ) -> JSValue;
1992}
1993#[repr(C)]
1994#[derive(Copy, Clone)]
1995pub struct JSCFunctionListEntry {
1996    pub name: *const ::std::os::raw::c_char,
1997    pub prop_flags: u8,
1998    pub def_type: u8,
1999    pub magic: i16,
2000    pub u: JSCFunctionListEntry__bindgen_ty_1,
2001}
2002#[repr(C)]
2003#[derive(Copy, Clone)]
2004pub union JSCFunctionListEntry__bindgen_ty_1 {
2005    pub func: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1,
2006    pub getset: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2,
2007    pub alias: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3,
2008    pub prop_list: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4,
2009    pub str: *const ::std::os::raw::c_char,
2010    pub i32: i32,
2011    pub i64: i64,
2012    pub f64: f64,
2013    _bindgen_union_align: [u64; 2usize],
2014}
2015#[repr(C)]
2016#[derive(Copy, Clone)]
2017pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1 {
2018    pub length: u8,
2019    pub cproto: u8,
2020    pub cfunc: JSCFunctionType,
2021}
2022#[test]
2023fn bindgen_test_layout_JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1() {
2024    assert_eq!(
2025        ::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1>(),
2026        16usize,
2027        concat!(
2028            "Size of: ",
2029            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1)
2030        )
2031    );
2032    assert_eq!(
2033        ::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1>(),
2034        8usize,
2035        concat!(
2036            "Alignment of ",
2037            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1)
2038        )
2039    );
2040    assert_eq!(
2041        unsafe {
2042            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1>())).length
2043                as *const _ as usize
2044        },
2045        0usize,
2046        concat!(
2047            "Offset of field: ",
2048            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1),
2049            "::",
2050            stringify!(length)
2051        )
2052    );
2053    assert_eq!(
2054        unsafe {
2055            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1>())).cproto
2056                as *const _ as usize
2057        },
2058        1usize,
2059        concat!(
2060            "Offset of field: ",
2061            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1),
2062            "::",
2063            stringify!(cproto)
2064        )
2065    );
2066    assert_eq!(
2067        unsafe {
2068            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1>())).cfunc
2069                as *const _ as usize
2070        },
2071        8usize,
2072        concat!(
2073            "Offset of field: ",
2074            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1),
2075            "::",
2076            stringify!(cfunc)
2077        )
2078    );
2079}
2080#[repr(C)]
2081#[derive(Copy, Clone)]
2082pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2 {
2083    pub get: JSCFunctionType,
2084    pub set: JSCFunctionType,
2085}
2086#[test]
2087fn bindgen_test_layout_JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2() {
2088    assert_eq!(
2089        ::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2>(),
2090        16usize,
2091        concat!(
2092            "Size of: ",
2093            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2)
2094        )
2095    );
2096    assert_eq!(
2097        ::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2>(),
2098        8usize,
2099        concat!(
2100            "Alignment of ",
2101            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2)
2102        )
2103    );
2104    assert_eq!(
2105        unsafe {
2106            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2>())).get
2107                as *const _ as usize
2108        },
2109        0usize,
2110        concat!(
2111            "Offset of field: ",
2112            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2),
2113            "::",
2114            stringify!(get)
2115        )
2116    );
2117    assert_eq!(
2118        unsafe {
2119            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2>())).set
2120                as *const _ as usize
2121        },
2122        8usize,
2123        concat!(
2124            "Offset of field: ",
2125            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2),
2126            "::",
2127            stringify!(set)
2128        )
2129    );
2130}
2131#[repr(C)]
2132#[derive(Debug, Copy, Clone)]
2133pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3 {
2134    pub name: *const ::std::os::raw::c_char,
2135    pub base: ::std::os::raw::c_int,
2136}
2137#[test]
2138fn bindgen_test_layout_JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3() {
2139    assert_eq!(
2140        ::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3>(),
2141        16usize,
2142        concat!(
2143            "Size of: ",
2144            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3)
2145        )
2146    );
2147    assert_eq!(
2148        ::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3>(),
2149        8usize,
2150        concat!(
2151            "Alignment of ",
2152            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3)
2153        )
2154    );
2155    assert_eq!(
2156        unsafe {
2157            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3>())).name
2158                as *const _ as usize
2159        },
2160        0usize,
2161        concat!(
2162            "Offset of field: ",
2163            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3),
2164            "::",
2165            stringify!(name)
2166        )
2167    );
2168    assert_eq!(
2169        unsafe {
2170            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3>())).base
2171                as *const _ as usize
2172        },
2173        8usize,
2174        concat!(
2175            "Offset of field: ",
2176            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3),
2177            "::",
2178            stringify!(base)
2179        )
2180    );
2181}
2182#[repr(C)]
2183#[derive(Debug, Copy, Clone)]
2184pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4 {
2185    pub tab: *const JSCFunctionListEntry,
2186    pub len: ::std::os::raw::c_int,
2187}
2188#[test]
2189fn bindgen_test_layout_JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4() {
2190    assert_eq!(
2191        ::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4>(),
2192        16usize,
2193        concat!(
2194            "Size of: ",
2195            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4)
2196        )
2197    );
2198    assert_eq!(
2199        ::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4>(),
2200        8usize,
2201        concat!(
2202            "Alignment of ",
2203            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4)
2204        )
2205    );
2206    assert_eq!(
2207        unsafe {
2208            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4>())).tab
2209                as *const _ as usize
2210        },
2211        0usize,
2212        concat!(
2213            "Offset of field: ",
2214            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4),
2215            "::",
2216            stringify!(tab)
2217        )
2218    );
2219    assert_eq!(
2220        unsafe {
2221            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4>())).len
2222                as *const _ as usize
2223        },
2224        8usize,
2225        concat!(
2226            "Offset of field: ",
2227            stringify!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4),
2228            "::",
2229            stringify!(len)
2230        )
2231    );
2232}
2233#[test]
2234fn bindgen_test_layout_JSCFunctionListEntry__bindgen_ty_1() {
2235    assert_eq!(
2236        ::std::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1>(),
2237        16usize,
2238        concat!("Size of: ", stringify!(JSCFunctionListEntry__bindgen_ty_1))
2239    );
2240    assert_eq!(
2241        ::std::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1>(),
2242        8usize,
2243        concat!(
2244            "Alignment of ",
2245            stringify!(JSCFunctionListEntry__bindgen_ty_1)
2246        )
2247    );
2248    assert_eq!(
2249        unsafe {
2250            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1>())).func as *const _ as usize
2251        },
2252        0usize,
2253        concat!(
2254            "Offset of field: ",
2255            stringify!(JSCFunctionListEntry__bindgen_ty_1),
2256            "::",
2257            stringify!(func)
2258        )
2259    );
2260    assert_eq!(
2261        unsafe {
2262            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1>())).getset as *const _
2263                as usize
2264        },
2265        0usize,
2266        concat!(
2267            "Offset of field: ",
2268            stringify!(JSCFunctionListEntry__bindgen_ty_1),
2269            "::",
2270            stringify!(getset)
2271        )
2272    );
2273    assert_eq!(
2274        unsafe {
2275            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1>())).alias as *const _
2276                as usize
2277        },
2278        0usize,
2279        concat!(
2280            "Offset of field: ",
2281            stringify!(JSCFunctionListEntry__bindgen_ty_1),
2282            "::",
2283            stringify!(alias)
2284        )
2285    );
2286    assert_eq!(
2287        unsafe {
2288            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1>())).prop_list as *const _
2289                as usize
2290        },
2291        0usize,
2292        concat!(
2293            "Offset of field: ",
2294            stringify!(JSCFunctionListEntry__bindgen_ty_1),
2295            "::",
2296            stringify!(prop_list)
2297        )
2298    );
2299    assert_eq!(
2300        unsafe {
2301            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1>())).str as *const _ as usize
2302        },
2303        0usize,
2304        concat!(
2305            "Offset of field: ",
2306            stringify!(JSCFunctionListEntry__bindgen_ty_1),
2307            "::",
2308            stringify!(str)
2309        )
2310    );
2311    assert_eq!(
2312        unsafe {
2313            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1>())).i32 as *const _ as usize
2314        },
2315        0usize,
2316        concat!(
2317            "Offset of field: ",
2318            stringify!(JSCFunctionListEntry__bindgen_ty_1),
2319            "::",
2320            stringify!(i32)
2321        )
2322    );
2323    assert_eq!(
2324        unsafe {
2325            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1>())).i64 as *const _ as usize
2326        },
2327        0usize,
2328        concat!(
2329            "Offset of field: ",
2330            stringify!(JSCFunctionListEntry__bindgen_ty_1),
2331            "::",
2332            stringify!(i64)
2333        )
2334    );
2335    assert_eq!(
2336        unsafe {
2337            &(*(::std::ptr::null::<JSCFunctionListEntry__bindgen_ty_1>())).f64 as *const _ as usize
2338        },
2339        0usize,
2340        concat!(
2341            "Offset of field: ",
2342            stringify!(JSCFunctionListEntry__bindgen_ty_1),
2343            "::",
2344            stringify!(f64)
2345        )
2346    );
2347}
2348#[test]
2349fn bindgen_test_layout_JSCFunctionListEntry() {
2350    assert_eq!(
2351        ::std::mem::size_of::<JSCFunctionListEntry>(),
2352        32usize,
2353        concat!("Size of: ", stringify!(JSCFunctionListEntry))
2354    );
2355    assert_eq!(
2356        ::std::mem::align_of::<JSCFunctionListEntry>(),
2357        8usize,
2358        concat!("Alignment of ", stringify!(JSCFunctionListEntry))
2359    );
2360    assert_eq!(
2361        unsafe { &(*(::std::ptr::null::<JSCFunctionListEntry>())).name as *const _ as usize },
2362        0usize,
2363        concat!(
2364            "Offset of field: ",
2365            stringify!(JSCFunctionListEntry),
2366            "::",
2367            stringify!(name)
2368        )
2369    );
2370    assert_eq!(
2371        unsafe { &(*(::std::ptr::null::<JSCFunctionListEntry>())).prop_flags as *const _ as usize },
2372        8usize,
2373        concat!(
2374            "Offset of field: ",
2375            stringify!(JSCFunctionListEntry),
2376            "::",
2377            stringify!(prop_flags)
2378        )
2379    );
2380    assert_eq!(
2381        unsafe { &(*(::std::ptr::null::<JSCFunctionListEntry>())).def_type as *const _ as usize },
2382        9usize,
2383        concat!(
2384            "Offset of field: ",
2385            stringify!(JSCFunctionListEntry),
2386            "::",
2387            stringify!(def_type)
2388        )
2389    );
2390    assert_eq!(
2391        unsafe { &(*(::std::ptr::null::<JSCFunctionListEntry>())).magic as *const _ as usize },
2392        10usize,
2393        concat!(
2394            "Offset of field: ",
2395            stringify!(JSCFunctionListEntry),
2396            "::",
2397            stringify!(magic)
2398        )
2399    );
2400    assert_eq!(
2401        unsafe { &(*(::std::ptr::null::<JSCFunctionListEntry>())).u as *const _ as usize },
2402        16usize,
2403        concat!(
2404            "Offset of field: ",
2405            stringify!(JSCFunctionListEntry),
2406            "::",
2407            stringify!(u)
2408        )
2409    );
2410}
2411extern "C" {
2412    pub fn JS_SetPropertyFunctionList(
2413        ctx: *mut JSContext,
2414        obj: JSValue,
2415        tab: *const JSCFunctionListEntry,
2416        len: ::std::os::raw::c_int,
2417    );
2418}
2419pub type JSModuleInitFunc = ::std::option::Option<
2420    unsafe extern "C" fn(ctx: *mut JSContext, m: *mut JSModuleDef) -> ::std::os::raw::c_int,
2421>;
2422extern "C" {
2423    pub fn JS_NewCModule(
2424        ctx: *mut JSContext,
2425        name_str: *const ::std::os::raw::c_char,
2426        func: JSModuleInitFunc,
2427    ) -> *mut JSModuleDef;
2428}
2429extern "C" {
2430    pub fn JS_AddModuleExport(
2431        ctx: *mut JSContext,
2432        m: *mut JSModuleDef,
2433        name_str: *const ::std::os::raw::c_char,
2434    ) -> ::std::os::raw::c_int;
2435}
2436extern "C" {
2437    pub fn JS_AddModuleExportList(
2438        ctx: *mut JSContext,
2439        m: *mut JSModuleDef,
2440        tab: *const JSCFunctionListEntry,
2441        len: ::std::os::raw::c_int,
2442    ) -> ::std::os::raw::c_int;
2443}
2444extern "C" {
2445    pub fn JS_SetModuleExport(
2446        ctx: *mut JSContext,
2447        m: *mut JSModuleDef,
2448        export_name: *const ::std::os::raw::c_char,
2449        val: JSValue,
2450    ) -> ::std::os::raw::c_int;
2451}
2452extern "C" {
2453    pub fn JS_SetModuleExportList(
2454        ctx: *mut JSContext,
2455        m: *mut JSModuleDef,
2456        tab: *const JSCFunctionListEntry,
2457        len: ::std::os::raw::c_int,
2458    ) -> ::std::os::raw::c_int;
2459}
2460extern "C" {
2461    pub fn js_init_module_std(
2462        ctx: *mut JSContext,
2463        module_name: *const ::std::os::raw::c_char,
2464    ) -> *mut JSModuleDef;
2465}
2466extern "C" {
2467    pub fn js_init_module_os(
2468        ctx: *mut JSContext,
2469        module_name: *const ::std::os::raw::c_char,
2470    ) -> *mut JSModuleDef;
2471}
2472extern "C" {
2473    pub fn js_std_add_helpers(
2474        ctx: *mut JSContext,
2475        argc: ::std::os::raw::c_int,
2476        argv: *mut *mut ::std::os::raw::c_char,
2477    );
2478}
2479extern "C" {
2480    pub fn js_std_loop(ctx: *mut JSContext);
2481}
2482extern "C" {
2483    pub fn js_std_free_handlers(rt: *mut JSRuntime);
2484}
2485extern "C" {
2486    pub fn js_std_dump_error(ctx: *mut JSContext);
2487}
2488extern "C" {
2489    pub fn js_load_file(
2490        ctx: *mut JSContext,
2491        pbuf_len: *mut usize,
2492        filename: *const ::std::os::raw::c_char,
2493    ) -> *mut u8;
2494}
2495extern "C" {
2496    pub fn js_module_loader(
2497        ctx: *mut JSContext,
2498        module_name: *const ::std::os::raw::c_char,
2499        opaque: *mut ::std::os::raw::c_void,
2500    ) -> *mut JSModuleDef;
2501}
2502extern "C" {
2503    pub fn js_std_eval_binary(
2504        ctx: *mut JSContext,
2505        buf: *const u8,
2506        buf_len: usize,
2507        flags: ::std::os::raw::c_int,
2508    );
2509}