unsafe extern "C" {
fn JS_ValueGetTag_real(v: JSValue) -> i32;
#[cfg(feature = "bellard")]
fn JS_DupValue_real(ctx: *mut JSContext, v: JSValue);
#[cfg(feature = "bellard")]
fn JS_DupValueRT_real(rt: *mut JSRuntime, v: JSValue);
#[cfg(feature = "bellard")]
fn JS_FreeValue_real(ctx: *mut JSContext, v: JSValue);
#[cfg(feature = "bellard")]
fn JS_FreeValueRT_real(rt: *mut JSRuntime, v: JSValue);
fn JS_NewBool_real(ctx: *mut JSContext, v: bool) -> JSValue;
fn JS_NewInt32_real(ctx: *mut JSContext, v: i32) -> JSValue;
#[cfg(feature = "bellard")]
fn JS_NewFloat64_real(ctx: *mut JSContext, v: f64) -> JSValue;
fn JS_VALUE_IS_NAN_real(v: JSValue) -> bool;
fn JS_VALUE_GET_FLOAT64_real(v: JSValue) -> f64;
fn JS_VALUE_GET_NORM_TAG_real(v: JSValue) -> ::std::os::raw::c_int;
fn JS_IsNumber_real(v: JSValue) -> bool;
#[cfg(feature = "bellard")]
fn JS_IsBigInt_real(ctx: *mut JSContext, v: JSValue) -> bool;
#[cfg(feature = "quickjs-ng")]
fn JS_IsBigInt_real(v: JSValue) -> bool;
fn JS_IsBool_real(v: JSValue) -> bool;
fn JS_IsNull_real(v: JSValue) -> bool;
fn JS_IsUndefined_real(v: JSValue) -> bool;
fn JS_IsException_real(v: JSValue) -> bool;
fn JS_IsUninitialized_real(v: JSValue) -> bool;
fn JS_IsString_real(v: JSValue) -> bool;
fn JS_IsSymbol_real(v: JSValue) -> bool;
fn JS_IsObject_real(v: JSValue) -> bool;
fn JS_ToUint32_real(ctx: *mut JSContext, pres: u32, val: JSValue) -> u32;
#[cfg(feature = "bellard")]
fn JS_SetProperty_real(
ctx: *mut JSContext,
this_obj: JSValue,
prop: JSAtom,
val: JSValue,
) -> ::std::os::raw::c_int;
fn JS_NewCFunction_real(
ctx: *mut JSContext,
func: *mut JSCFunction,
name: *const ::std::os::raw::c_char,
length: ::std::os::raw::c_int,
) -> JSValue;
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;
}
pub unsafe fn JS_ValueGetTag(v: JSValue) -> i32 {
unsafe { JS_ValueGetTag_real(v) }
}
#[cfg(feature = "bellard")]
pub unsafe fn JS_DupValue(ctx: *mut JSContext, v: JSValue) {
unsafe {
JS_DupValue_real(ctx, v);
}
}
#[cfg(feature = "bellard")]
pub unsafe fn JS_DupValueRT(rt: *mut JSRuntime, v: JSValue) {
unsafe {
JS_DupValueRT_real(rt, v);
}
}
#[cfg(feature = "bellard")]
pub unsafe fn JS_FreeValue(ctx: *mut JSContext, v: JSValue) {
unsafe {
JS_FreeValue_real(ctx, v);
}
}
#[cfg(feature = "bellard")]
pub unsafe fn JS_FreeValueRT(rt: *mut JSRuntime, v: JSValue) {
unsafe {
JS_FreeValueRT_real(rt, v);
}
}
pub unsafe fn JS_NewBool(ctx: *mut JSContext, v: bool) -> JSValue {
unsafe { JS_NewBool_real(ctx, v) }
}
pub unsafe fn JS_NewInt32(ctx: *mut JSContext, v: i32) -> JSValue {
unsafe { JS_NewInt32_real(ctx, v) }
}
#[cfg(feature = "bellard")]
pub unsafe fn JS_NewFloat64(ctx: *mut JSContext, v: f64) -> JSValue {
unsafe { JS_NewFloat64_real(ctx, v) }
}
pub unsafe fn JS_VALUE_IS_NAN(v: JSValue) -> bool {
unsafe { JS_VALUE_IS_NAN_real(v) }
}
pub unsafe fn JS_VALUE_GET_FLOAT64(v: JSValue) -> f64 {
unsafe { JS_VALUE_GET_FLOAT64_real(v) }
}
pub unsafe fn JS_VALUE_GET_NORM_TAG(v: JSValue) -> ::std::os::raw::c_int {
unsafe { JS_VALUE_GET_NORM_TAG_real(v) }
}
pub unsafe fn JS_IsNumber(v: JSValue) -> bool {
unsafe { JS_IsNumber_real(v) }
}
#[cfg(feature = "bellard")]
pub unsafe fn JS_IsBigInt(ctx: *mut JSContext, v: JSValue) -> bool {
unsafe { JS_IsBigInt_real(ctx, v) }
}
#[cfg(feature = "quickjs-ng")]
pub unsafe fn JS_IsBigInt(v: JSValue) -> bool {
unsafe { JS_IsBigInt_real(v) }
}
pub unsafe fn JS_IsBool(v: JSValue) -> bool {
unsafe { JS_IsBool_real(v) }
}
pub unsafe fn JS_IsNull(v: JSValue) -> bool {
unsafe { JS_IsNull_real(v) }
}
pub unsafe fn JS_IsUndefined(v: JSValue) -> bool {
unsafe { JS_IsUndefined_real(v) }
}
pub unsafe fn JS_IsException(v: JSValue) -> bool {
unsafe { JS_IsException_real(v) }
}
pub unsafe fn JS_IsUninitialized(v: JSValue) -> bool {
unsafe { JS_IsUninitialized_real(v) }
}
pub unsafe fn JS_IsString(v: JSValue) -> bool {
unsafe { JS_IsString_real(v) }
}
pub unsafe fn JS_IsSymbol(v: JSValue) -> bool {
unsafe { JS_IsSymbol_real(v) }
}
pub unsafe fn JS_IsObject(v: JSValue) -> bool {
unsafe { JS_IsObject_real(v) }
}
pub unsafe fn JS_ToUint32(ctx: *mut JSContext, pres: u32, val: JSValue) -> u32 {
unsafe { JS_ToUint32_real(ctx, pres, val) }
}
#[cfg(feature = "bellard")]
pub unsafe fn JS_SetProperty(
ctx: *mut JSContext,
this_obj: JSValue,
prop: JSAtom,
val: JSValue,
) -> ::std::os::raw::c_int {
unsafe { JS_SetProperty_real(ctx, this_obj, prop, val) }
}
pub unsafe fn JS_NewCFunction(
ctx: *mut JSContext,
func: *mut JSCFunction,
name: *const ::std::os::raw::c_char,
length: ::std::os::raw::c_int,
) -> JSValue {
unsafe { JS_NewCFunction_real(ctx, func, name, length) }
}
pub 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 {
unsafe { JS_NewCFunctionMagic_real(ctx, func, name, length, cproto, magic) }
}