1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
/* automatically generated by rust-bindgen */

pub type intmax_t = ::std::os::raw::c_long;
pub type uintmax_t = ::std::os::raw::c_ulong;
pub type char16_t = u16;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_env__ {
    _unused: [u8; 0],
}
pub type napi_env = u64;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_value__ {
    _unused: [u8; 0],
}
pub type napi_value = u64;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_ref__ {
    _unused: [u8; 0],
}
pub type napi_ref = *mut napi_ref__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_handle_scope__ {
    _unused: [u8; 0],
}
pub type napi_handle_scope = *mut napi_handle_scope__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_escapable_handle_scope__ {
    _unused: [u8; 0],
}
pub type napi_escapable_handle_scope = *mut napi_escapable_handle_scope__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_callback_info__ {
    _unused: [u8; 0],
}
pub type napi_callback_info = *mut napi_callback_info__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_async_work__ {
    _unused: [u8; 0],
}
pub type napi_async_work = *mut napi_async_work__;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_property_attributes {
    napi_default = 0,
    napi_writable = 1,
    napi_enumerable = 2,
    napi_configurable = 4,
    napi_static = 1024,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_valuetype {
    napi_undefined = 0,
    napi_null = 1,
    napi_boolean = 2,
    napi_number = 3,
    napi_string = 4,
    napi_symbol = 5,
    napi_object = 6,
    napi_function = 7,
    napi_external = 8,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_typedarray_type {
    napi_int8_array = 0,
    napi_uint8_array = 1,
    napi_uint8_clamped_array = 2,
    napi_int16_array = 3,
    napi_uint16_array = 4,
    napi_int32_array = 5,
    napi_uint32_array = 6,
    napi_float32_array = 7,
    napi_float64_array = 8,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_status {
    napi_ok = 0,
    napi_invalid_arg = 1,
    napi_object_expected = 2,
    napi_string_expected = 3,
    napi_name_expected = 4,
    napi_function_expected = 5,
    napi_number_expected = 6,
    napi_boolean_expected = 7,
    napi_array_expected = 8,
    napi_generic_failure = 9,
    napi_pending_exception = 10,
    napi_cancelled = 11,
    napi_status_last = 12,
}
pub type napi_callback =
    ::std::option::Option<unsafe extern "C" fn(env: napi_env,
                                               info: napi_callback_info)
                              -> napi_value>;
pub type napi_finalize =
    ::std::option::Option<unsafe extern "C" fn(env: napi_env,
                                               finalize_data:
                                                   *mut ::std::os::raw::c_void,
                                               finalize_hint:
                                                   *mut ::std::os::raw::c_void)>;
pub type napi_async_execute_callback =
    ::std::option::Option<unsafe extern "C" fn(env: napi_env,
                                               data:
                                                   *mut ::std::os::raw::c_void)>;
pub type napi_async_complete_callback =
    ::std::option::Option<unsafe extern "C" fn(env: napi_env,
                                               status: napi_status,
                                               data:
                                                   *mut ::std::os::raw::c_void)>;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct napi_property_descriptor {
    pub utf8name: *const ::std::os::raw::c_char,
    pub name: napi_value,
    pub method: napi_callback,
    pub getter: napi_callback,
    pub setter: napi_callback,
    pub value: napi_value,
    pub attributes: napi_property_attributes,
    pub data: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_napi_property_descriptor() {
    assert_eq!(::std::mem::size_of::<napi_property_descriptor>() , 64usize ,
               concat ! (
               "Size of: " , stringify ! ( napi_property_descriptor ) ));
    assert_eq! (::std::mem::align_of::<napi_property_descriptor>() , 8usize ,
                concat ! (
                "Alignment of " , stringify ! ( napi_property_descriptor ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_property_descriptor ) ) . utf8name
                as * const _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_property_descriptor ) , "::" , stringify ! ( utf8name )
                ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_property_descriptor ) ) . name as *
                const _ as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_property_descriptor ) , "::" , stringify ! ( name ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_property_descriptor ) ) . method as
                * const _ as usize } , 16usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_property_descriptor ) , "::" , stringify ! ( method ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_property_descriptor ) ) . getter as
                * const _ as usize } , 24usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_property_descriptor ) , "::" , stringify ! ( getter ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_property_descriptor ) ) . setter as
                * const _ as usize } , 32usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_property_descriptor ) , "::" , stringify ! ( setter ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_property_descriptor ) ) . value as *
                const _ as usize } , 40usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_property_descriptor ) , "::" , stringify ! ( value ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_property_descriptor ) ) . attributes
                as * const _ as usize } , 48usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_property_descriptor ) , "::" , stringify ! ( attributes )
                ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_property_descriptor ) ) . data as *
                const _ as usize } , 56usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_property_descriptor ) , "::" , stringify ! ( data ) ));
}
impl Clone for napi_property_descriptor {
    fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct napi_extended_error_info {
    pub error_message: *const ::std::os::raw::c_char,
    pub engine_reserved: *mut ::std::os::raw::c_void,
    pub engine_error_code: u32,
    pub error_code: napi_status,
}
#[test]
fn bindgen_test_layout_napi_extended_error_info() {
    assert_eq!(::std::mem::size_of::<napi_extended_error_info>() , 24usize ,
               concat ! (
               "Size of: " , stringify ! ( napi_extended_error_info ) ));
    assert_eq! (::std::mem::align_of::<napi_extended_error_info>() , 8usize ,
                concat ! (
                "Alignment of " , stringify ! ( napi_extended_error_info ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_extended_error_info ) ) .
                error_message as * const _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_extended_error_info ) , "::" , stringify ! (
                error_message ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_extended_error_info ) ) .
                engine_reserved as * const _ as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_extended_error_info ) , "::" , stringify ! (
                engine_reserved ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_extended_error_info ) ) .
                engine_error_code as * const _ as usize } , 16usize , concat !
                (
                "Alignment of field: " , stringify ! (
                napi_extended_error_info ) , "::" , stringify ! (
                engine_error_code ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_extended_error_info ) ) . error_code
                as * const _ as usize } , 20usize , concat ! (
                "Alignment of field: " , stringify ! (
                napi_extended_error_info ) , "::" , stringify ! ( error_code )
                ));
}
impl Clone for napi_extended_error_info {
    fn clone(&self) -> Self { *self }
}
pub type napi_addon_register_func =
    ::std::option::Option<unsafe extern "C" fn(env: napi_env,
                                               exports: napi_value,
                                               module: napi_value,
                                               priv_:
                                                   *mut ::std::os::raw::c_void)>;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct napi_module {
    pub nm_version: ::std::os::raw::c_int,
    pub nm_flags: ::std::os::raw::c_uint,
    pub nm_filename: *const ::std::os::raw::c_char,
    pub nm_register_func: napi_addon_register_func,
    pub nm_modname: *const ::std::os::raw::c_char,
    pub nm_priv: *mut ::std::os::raw::c_void,
    pub reserved: [*mut ::std::os::raw::c_void; 4usize],
}
#[test]
fn bindgen_test_layout_napi_module() {
    assert_eq!(::std::mem::size_of::<napi_module>() , 72usize , concat ! (
               "Size of: " , stringify ! ( napi_module ) ));
    assert_eq! (::std::mem::align_of::<napi_module>() , 8usize , concat ! (
                "Alignment of " , stringify ! ( napi_module ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_module ) ) . nm_version as * const _
                as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( napi_module ) , "::" ,
                stringify ! ( nm_version ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_module ) ) . nm_flags as * const _
                as usize } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( napi_module ) , "::" ,
                stringify ! ( nm_flags ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_module ) ) . nm_filename as * const
                _ as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! ( napi_module ) , "::" ,
                stringify ! ( nm_filename ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_module ) ) . nm_register_func as *
                const _ as usize } , 16usize , concat ! (
                "Alignment of field: " , stringify ! ( napi_module ) , "::" ,
                stringify ! ( nm_register_func ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_module ) ) . nm_modname as * const _
                as usize } , 24usize , concat ! (
                "Alignment of field: " , stringify ! ( napi_module ) , "::" ,
                stringify ! ( nm_modname ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_module ) ) . nm_priv as * const _ as
                usize } , 32usize , concat ! (
                "Alignment of field: " , stringify ! ( napi_module ) , "::" ,
                stringify ! ( nm_priv ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const napi_module ) ) . reserved as * const _
                as usize } , 40usize , concat ! (
                "Alignment of field: " , stringify ! ( napi_module ) , "::" ,
                stringify ! ( reserved ) ));
}
impl Clone for napi_module {
    fn clone(&self) -> Self { *self }
}

extern "C" {
    pub fn napi_module_register(mod_: *mut napi_module);
}
extern "C" {
    pub fn napi_get_last_error_info(env: napi_env,
                                    result:
                                        *mut *const napi_extended_error_info)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_undefined(env: napi_env, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_null(env: napi_env, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_global(env: napi_env, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_boolean(env: napi_env, value: bool,
                            result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_create_object(env: napi_env, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_array(env: napi_env, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_array_with_length(env: napi_env, length: usize,
                                         result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_number(env: napi_env, value: f64,
                              result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_create_string_latin1(env: napi_env,
                                     str: *const ::std::os::raw::c_char,
                                     length: usize, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_string_utf8(env: napi_env,
                                   str: *const ::std::os::raw::c_char,
                                   length: usize, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_string_utf16(env: napi_env, str: *const char16_t,
                                    length: usize, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_symbol(env: napi_env, description: napi_value,
                              result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_create_function(env: napi_env,
                                utf8name: *const ::std::os::raw::c_char,
                                cb: napi_callback,
                                data: *mut ::std::os::raw::c_void,
                                result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_create_error(env: napi_env, msg: napi_value,
                             result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_create_type_error(env: napi_env, msg: napi_value,
                                  result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_create_range_error(env: napi_env, msg: napi_value,
                                   result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_typeof(env: napi_env, value: napi_value,
                       result: *mut napi_valuetype) -> napi_status;
}
extern "C" {
    pub fn napi_get_value_double(env: napi_env, value: napi_value,
                                 result: *mut f64) -> napi_status;
}
extern "C" {
    pub fn napi_get_value_int32(env: napi_env, value: napi_value,
                                result: *mut i32) -> napi_status;
}
extern "C" {
    pub fn napi_get_value_uint32(env: napi_env, value: napi_value,
                                 result: *mut u32) -> napi_status;
}
extern "C" {
    pub fn napi_get_value_int64(env: napi_env, value: napi_value,
                                result: *mut i64) -> napi_status;
}
extern "C" {
    pub fn napi_get_value_bool(env: napi_env, value: napi_value,
                               result: *mut bool) -> napi_status;
}
extern "C" {
    pub fn napi_get_value_string_latin1(env: napi_env, value: napi_value,
                                        buf: *mut ::std::os::raw::c_char,
                                        bufsize: usize, result: *mut usize)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_value_string_utf8(env: napi_env, value: napi_value,
                                      buf: *mut ::std::os::raw::c_char,
                                      bufsize: usize, result: *mut usize)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_value_string_utf16(env: napi_env, value: napi_value,
                                       buf: *mut char16_t, bufsize: usize,
                                       result: *mut usize) -> napi_status;
}
extern "C" {
    pub fn napi_coerce_to_bool(env: napi_env, value: napi_value,
                               result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_coerce_to_number(env: napi_env, value: napi_value,
                                 result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_coerce_to_object(env: napi_env, value: napi_value,
                                 result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_coerce_to_string(env: napi_env, value: napi_value,
                                 result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_get_prototype(env: napi_env, object: napi_value,
                              result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_get_property_names(env: napi_env, object: napi_value,
                                   result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_set_property(env: napi_env, object: napi_value,
                             key: napi_value, value: napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_has_property(env: napi_env, object: napi_value,
                             key: napi_value, result: *mut bool)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_property(env: napi_env, object: napi_value,
                             key: napi_value, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_set_named_property(env: napi_env, object: napi_value,
                                   utf8name: *const ::std::os::raw::c_char,
                                   value: napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_has_named_property(env: napi_env, object: napi_value,
                                   utf8name: *const ::std::os::raw::c_char,
                                   result: *mut bool) -> napi_status;
}
extern "C" {
    pub fn napi_get_named_property(env: napi_env, object: napi_value,
                                   utf8name: *const ::std::os::raw::c_char,
                                   result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_set_element(env: napi_env, object: napi_value, index: u32,
                            value: napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_has_element(env: napi_env, object: napi_value, index: u32,
                            result: *mut bool) -> napi_status;
}
extern "C" {
    pub fn napi_get_element(env: napi_env, object: napi_value, index: u32,
                            result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_define_properties(env: napi_env, object: napi_value,
                                  property_count: usize,
                                  properties: *const napi_property_descriptor)
     -> napi_status;
}
extern "C" {
    pub fn napi_is_array(env: napi_env, value: napi_value, result: *mut bool)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_array_length(env: napi_env, value: napi_value,
                                 result: *mut u32) -> napi_status;
}
extern "C" {
    pub fn napi_strict_equals(env: napi_env, lhs: napi_value, rhs: napi_value,
                              result: *mut bool) -> napi_status;
}
extern "C" {
    pub fn napi_call_function(env: napi_env, recv: napi_value,
                              func: napi_value, argc: usize,
                              argv: *const napi_value,
                              result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_new_instance(env: napi_env, constructor: napi_value,
                             argc: usize, argv: *const napi_value,
                             result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_instanceof(env: napi_env, object: napi_value,
                           constructor: napi_value, result: *mut bool)
     -> napi_status;
}
extern "C" {
    pub fn napi_make_callback(env: napi_env, recv: napi_value,
                              func: napi_value, argc: usize,
                              argv: *const napi_value,
                              result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_get_cb_info(env: napi_env, cbinfo: napi_callback_info,
                            argc: *mut usize, argv: *mut napi_value,
                            this_arg: *mut napi_value,
                            data: *mut *mut ::std::os::raw::c_void)
     -> napi_status;
}
extern "C" {
    pub fn napi_is_construct_call(env: napi_env, cbinfo: napi_callback_info,
                                  result: *mut bool) -> napi_status;
}
extern "C" {
    pub fn napi_define_class(env: napi_env,
                             utf8name: *const ::std::os::raw::c_char,
                             constructor: napi_callback,
                             data: *mut ::std::os::raw::c_void,
                             property_count: usize,
                             properties: *const napi_property_descriptor,
                             result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_wrap(env: napi_env, js_object: napi_value,
                     native_object: *mut ::std::os::raw::c_void,
                     finalize_cb: napi_finalize,
                     finalize_hint: *mut ::std::os::raw::c_void,
                     result: *mut napi_ref) -> napi_status;
}
extern "C" {
    pub fn napi_unwrap(env: napi_env, js_object: napi_value,
                       result: *mut *mut ::std::os::raw::c_void)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_external(env: napi_env,
                                data: *mut ::std::os::raw::c_void,
                                finalize_cb: napi_finalize,
                                finalize_hint: *mut ::std::os::raw::c_void,
                                result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_get_value_external(env: napi_env, value: napi_value,
                                   result: *mut *mut ::std::os::raw::c_void)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_reference(env: napi_env, value: napi_value,
                                 initial_refcount: u32, result: *mut napi_ref)
     -> napi_status;
}
extern "C" {
    pub fn napi_delete_reference(env: napi_env, ref_: napi_ref)
     -> napi_status;
}
extern "C" {
    pub fn napi_reference_ref(env: napi_env, ref_: napi_ref, result: *mut u32)
     -> napi_status;
}
extern "C" {
    pub fn napi_reference_unref(env: napi_env, ref_: napi_ref,
                                result: *mut u32) -> napi_status;
}
extern "C" {
    pub fn napi_get_reference_value(env: napi_env, ref_: napi_ref,
                                    result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_open_handle_scope(env: napi_env,
                                  result: *mut napi_handle_scope)
     -> napi_status;
}
extern "C" {
    pub fn napi_close_handle_scope(env: napi_env, scope: napi_handle_scope)
     -> napi_status;
}
extern "C" {
    pub fn napi_open_escapable_handle_scope(env: napi_env,
                                            result:
                                                *mut napi_escapable_handle_scope)
     -> napi_status;
}
extern "C" {
    pub fn napi_close_escapable_handle_scope(env: napi_env,
                                             scope:
                                                 napi_escapable_handle_scope)
     -> napi_status;
}
extern "C" {
    pub fn napi_escape_handle(env: napi_env,
                              scope: napi_escapable_handle_scope,
                              escapee: napi_value, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_throw(env: napi_env, error: napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_throw_error(env: napi_env, msg: *const ::std::os::raw::c_char)
     -> napi_status;
}
extern "C" {
    pub fn napi_throw_type_error(env: napi_env,
                                 msg: *const ::std::os::raw::c_char)
     -> napi_status;
}
extern "C" {
    pub fn napi_throw_range_error(env: napi_env,
                                  msg: *const ::std::os::raw::c_char)
     -> napi_status;
}
extern "C" {
    pub fn napi_is_error(env: napi_env, value: napi_value, result: *mut bool)
     -> napi_status;
}
extern "C" {
    pub fn napi_is_exception_pending(env: napi_env, result: *mut bool)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_and_clear_last_exception(env: napi_env,
                                             result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_buffer(env: napi_env, length: usize,
                              data: *mut *mut ::std::os::raw::c_void,
                              result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_create_external_buffer(env: napi_env, length: usize,
                                       data: *mut ::std::os::raw::c_void,
                                       finalize_cb: napi_finalize,
                                       finalize_hint:
                                           *mut ::std::os::raw::c_void,
                                       result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_create_buffer_copy(env: napi_env, length: usize,
                                   data: *const ::std::os::raw::c_void,
                                   result_data:
                                       *mut *mut ::std::os::raw::c_void,
                                   result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_is_buffer(env: napi_env, value: napi_value, result: *mut bool)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_buffer_info(env: napi_env, value: napi_value,
                                data: *mut *mut ::std::os::raw::c_void,
                                length: *mut usize) -> napi_status;
}
extern "C" {
    pub fn napi_is_arraybuffer(env: napi_env, value: napi_value,
                               result: *mut bool) -> napi_status;
}
extern "C" {
    pub fn napi_create_arraybuffer(env: napi_env, byte_length: usize,
                                   data: *mut *mut ::std::os::raw::c_void,
                                   result: *mut napi_value) -> napi_status;
}
extern "C" {
    pub fn napi_create_external_arraybuffer(env: napi_env,
                                            external_data:
                                                *mut ::std::os::raw::c_void,
                                            byte_length: usize,
                                            finalize_cb: napi_finalize,
                                            finalize_hint:
                                                *mut ::std::os::raw::c_void,
                                            result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_arraybuffer_info(env: napi_env, arraybuffer: napi_value,
                                     data: *mut *mut ::std::os::raw::c_void,
                                     byte_length: *mut usize) -> napi_status;
}
extern "C" {
    pub fn napi_is_typedarray(env: napi_env, value: napi_value,
                              result: *mut bool) -> napi_status;
}
extern "C" {
    pub fn napi_create_typedarray(env: napi_env, type_: napi_typedarray_type,
                                  length: usize, arraybuffer: napi_value,
                                  byte_offset: usize, result: *mut napi_value)
     -> napi_status;
}
extern "C" {
    pub fn napi_get_typedarray_info(env: napi_env, typedarray: napi_value,
                                    type_: *mut napi_typedarray_type,
                                    length: *mut usize,
                                    data: *mut *mut ::std::os::raw::c_void,
                                    arraybuffer: *mut napi_value,
                                    byte_offset: *mut usize) -> napi_status;
}
extern "C" {
    pub fn napi_create_async_work(env: napi_env,
                                  execute: napi_async_execute_callback,
                                  complete: napi_async_complete_callback,
                                  data: *mut ::std::os::raw::c_void,
                                  result: *mut napi_async_work)
     -> napi_status;
}
extern "C" {
    pub fn napi_delete_async_work(env: napi_env, work: napi_async_work)
     -> napi_status;
}
extern "C" {
    pub fn napi_queue_async_work(env: napi_env, work: napi_async_work)
     -> napi_status;
}
extern "C" {
    pub fn napi_cancel_async_work(env: napi_env, work: napi_async_work)
     -> napi_status;
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct __va_list_tag {
    pub gp_offset: ::std::os::raw::c_uint,
    pub fp_offset: ::std::os::raw::c_uint,
    pub overflow_arg_area: *mut ::std::os::raw::c_void,
    pub reg_save_area: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout___va_list_tag() {
    assert_eq!(::std::mem::size_of::<__va_list_tag>() , 24usize , concat ! (
               "Size of: " , stringify ! ( __va_list_tag ) ));
    assert_eq! (::std::mem::align_of::<__va_list_tag>() , 8usize , concat ! (
                "Alignment of " , stringify ! ( __va_list_tag ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const __va_list_tag ) ) . gp_offset as * const
                _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( __va_list_tag ) , "::"
                , stringify ! ( gp_offset ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const __va_list_tag ) ) . fp_offset as * const
                _ as usize } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( __va_list_tag ) , "::"
                , stringify ! ( fp_offset ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const __va_list_tag ) ) . overflow_arg_area as
                * const _ as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! ( __va_list_tag ) , "::"
                , stringify ! ( overflow_arg_area ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const __va_list_tag ) ) . reg_save_area as *
                const _ as usize } , 16usize , concat ! (
                "Alignment of field: " , stringify ! ( __va_list_tag ) , "::"
                , stringify ! ( reg_save_area ) ));
}
impl Clone for __va_list_tag {
    fn clone(&self) -> Self { *self }
}
pub type __builtin_va_list = [__va_list_tag; 1usize];