hirofa_quickjs_sys/
static-functions.rs1
2extern "C" {
3 fn JS_ValueGetTag_real(v: JSValue) -> i32;
4 #[cfg(feature = "bellard")]
5 fn JS_DupValue_real(ctx: *mut JSContext, v: JSValue);
6 #[cfg(feature = "bellard")]
7 fn JS_DupValueRT_real(rt: *mut JSRuntime, v: JSValue);
8 #[cfg(feature = "bellard")]
9 fn JS_FreeValue_real(ctx: *mut JSContext, v: JSValue);
10 #[cfg(feature = "bellard")]
11 fn JS_FreeValueRT_real(rt: *mut JSRuntime, v: JSValue);
12 fn JS_NewBool_real(ctx: *mut JSContext, v: bool) -> JSValue;
13 fn JS_NewInt32_real(ctx: *mut JSContext, v: i32) -> JSValue;
14
15 #[cfg(feature = "bellard")]
16 fn JS_NewFloat64_real(ctx: *mut JSContext, v: f64) -> JSValue;
17
18 fn JS_VALUE_IS_NAN_real(v: JSValue) -> bool;
19 fn JS_VALUE_GET_FLOAT64_real(v: JSValue) -> f64;
20 fn JS_VALUE_GET_NORM_TAG_real(v: JSValue) -> ::std::os::raw::c_int;
21 fn JS_IsNumber_real(v: JSValue) -> bool;
22 fn JS_IsBigInt_real(ctx: *mut JSContext, v: JSValue) -> bool;
23 fn JS_IsBigFloat_real(v: JSValue) -> bool;
24 fn JS_IsBigDecimal_real(v: JSValue) -> bool;
25 fn JS_IsBool_real(v: JSValue) -> bool;
26 fn JS_IsNull_real(v: JSValue) -> bool;
27 fn JS_IsUndefined_real(v: JSValue) -> bool;
28 fn JS_IsException_real(v: JSValue) -> bool;
29 fn JS_IsUninitialized_real(v: JSValue) -> bool;
30 fn JS_IsString_real(v: JSValue) -> bool;
31 fn JS_IsSymbol_real(v: JSValue) -> bool;
32 fn JS_IsObject_real(v: JSValue) -> bool;
33 fn JS_ToUint32_real(ctx: *mut JSContext, pres: u32, val: JSValue) -> u32;
34 #[cfg(feature = "bellard")]
35 fn JS_SetProperty_real(ctx: *mut JSContext, this_obj: JSValue, prop: JSAtom, val: JSValue) -> ::std::os::raw::c_int;
36 fn JS_NewCFunction_real(ctx: *mut JSContext, func: *mut JSCFunction, name: *const ::std::os::raw::c_char,length: ::std::os::raw::c_int) -> JSValue;
37 fn JS_NewCFunctionMagic_real(ctx: *mut JSContext, func: *mut JSCFunctionMagic, name: *const ::std::os::raw::c_char, length: ::std::os::raw::c_int, cproto: JSCFunctionEnum, magic: ::std::os::raw::c_int) -> JSValue;
38}
39
40pub unsafe fn JS_ValueGetTag(v: JSValue) -> i32 {
41 JS_ValueGetTag_real(v)
42}
43
44#[cfg(feature = "bellard")]
46pub unsafe fn JS_DupValue(ctx: *mut JSContext, v: JSValue) {
47 JS_DupValue_real(ctx, v);
48}
49
50#[cfg(feature = "bellard")]
52pub unsafe fn JS_DupValueRT(rt: *mut JSRuntime, v: JSValue) {
53 JS_DupValueRT_real(rt, v);
54}
55
56#[cfg(feature = "bellard")]
58pub unsafe fn JS_FreeValue(ctx: *mut JSContext, v: JSValue) {
59 JS_FreeValue_real(ctx, v);
60}
61
62#[cfg(feature = "bellard")]
64pub unsafe fn JS_FreeValueRT(rt: *mut JSRuntime, v: JSValue) {
65 JS_FreeValueRT_real(rt, v);
66}
67
68pub unsafe fn JS_NewBool(ctx: *mut JSContext, v: bool) -> JSValue {
70 JS_NewBool_real(ctx, v)
71}
72
73pub unsafe fn JS_NewInt32(ctx: *mut JSContext, v: i32) -> JSValue {
75 JS_NewInt32_real(ctx, v)
76}
77
78#[cfg(feature = "bellard")]
80pub unsafe fn JS_NewFloat64(ctx: *mut JSContext, v: f64) -> JSValue {
81 JS_NewFloat64_real(ctx, v)
82}
83
84pub unsafe fn JS_VALUE_IS_NAN(v: JSValue) -> bool {
86 JS_VALUE_IS_NAN_real(v)
87}
88
89pub unsafe fn JS_VALUE_GET_FLOAT64(v: JSValue) -> f64 {
91 JS_VALUE_GET_FLOAT64_real(v)
92}
93
94pub unsafe fn JS_VALUE_GET_NORM_TAG(v: JSValue) -> ::std::os::raw::c_int {
96 JS_VALUE_GET_NORM_TAG_real(v)
97}
98
99pub unsafe fn JS_IsNumber(v: JSValue) -> bool {
101 JS_IsNumber_real(v)
102}
103
104pub unsafe fn JS_IsBigInt(ctx: *mut JSContext, v: JSValue) -> bool {
106 JS_IsBigInt_real(ctx,v)
107}
108
109pub unsafe fn JS_IsBigFloat(v: JSValue) -> bool {
111 JS_IsBigFloat_real(v)
112}
113
114pub unsafe fn JS_IsBigDecimal(v: JSValue) -> bool {
116 JS_IsBigDecimal_real(v)
117}
118
119pub unsafe fn JS_IsBool(v: JSValue) -> bool {
121 JS_IsBool_real(v)
122}
123
124pub unsafe fn JS_IsNull(v: JSValue) -> bool {
126 JS_IsNull_real(v)
127}
128
129pub unsafe fn JS_IsUndefined(v: JSValue) -> bool {
131 JS_IsUndefined_real(v)
132}
133
134pub unsafe fn JS_IsException(v: JSValue) -> bool{
136 JS_IsException_real(v)
137}
138
139pub unsafe fn JS_IsUninitialized(v: JSValue) -> bool {
141 JS_IsUninitialized_real(v)
142}
143
144pub unsafe fn JS_IsString(v: JSValue) -> bool {
146 JS_IsString_real(v)
147}
148
149pub unsafe fn JS_IsSymbol(v: JSValue) -> bool {
151 JS_IsSymbol_real(v)
152}
153
154pub unsafe fn JS_IsObject(v: JSValue) -> bool {
156 JS_IsObject_real(v)
157}
158
159pub unsafe fn JS_ToUint32(ctx: *mut JSContext, pres: u32, val: JSValue) -> u32 {
161 JS_ToUint32_real(ctx, pres, val)
162}
163
164#[cfg(feature = "bellard")]
166pub unsafe fn JS_SetProperty(ctx: *mut JSContext, this_obj: JSValue, prop: JSAtom, val: JSValue) -> ::std::os::raw::c_int {
167 JS_SetProperty_real(ctx, this_obj, prop, val)
168}
169
170pub unsafe fn JS_NewCFunction(ctx: *mut JSContext, func: *mut JSCFunction, name: *const ::std::os::raw::c_char,length: ::std::os::raw::c_int) -> JSValue {
172 JS_NewCFunction_real(ctx, func, name, length)
173}
174
175pub unsafe fn JS_NewCFunctionMagic(ctx: *mut JSContext, func: *mut JSCFunctionMagic, name: *const ::std::os::raw::c_char, length: ::std::os::raw::c_int, cproto: JSCFunctionEnum, magic: ::std::os::raw::c_int) -> JSValue {
177 JS_NewCFunctionMagic_real(ctx, func, name, length, cproto, magic)
178}