@@ -171,6 +171,7 @@ pub const M_2_SQRTPI: f64 = 1.1283791670955126;
171171pub const M_SQRT2 : f64 = 1.4142135623730951 ;
172172pub const M_SQRT1_2 : f64 = 0.7071067811865476 ;
173173pub const QUICKJS_NG : u32 = 1 ;
174+ pub const QUICKJS_NG_CC_GNULIKE : u32 = 1 ;
174175pub const JS_PROP_CONFIGURABLE : u32 = 1 ;
175176pub const JS_PROP_WRITABLE : u32 = 2 ;
176177pub const JS_PROP_ENUMERABLE : u32 = 4 ;
@@ -254,7 +255,7 @@ pub const JS_DEF_PROP_UNDEFINED: u32 = 7;
254255pub const JS_DEF_OBJECT : u32 = 8 ;
255256pub const JS_DEF_ALIAS : u32 = 9 ;
256257pub const QJS_VERSION_MAJOR : u32 = 0 ;
257- pub const QJS_VERSION_MINOR : u32 = 11 ;
258+ pub const QJS_VERSION_MINOR : u32 = 12 ;
258259pub const QJS_VERSION_PATCH : u32 = 0 ;
259260pub const QJS_VERSION_SUFFIX : & [ u8 ; 1 ] = b"\0 " ;
260261pub type __gnuc_va_list = __builtin_va_list ;
@@ -2771,6 +2772,7 @@ pub const JS_TAG_FIRST: _bindgen_ty_2 = -9;
27712772pub const JS_TAG_BIG_INT : _bindgen_ty_2 = -9 ;
27722773pub const JS_TAG_SYMBOL : _bindgen_ty_2 = -8 ;
27732774pub const JS_TAG_STRING : _bindgen_ty_2 = -7 ;
2775+ pub const JS_TAG_STRING_ROPE : _bindgen_ty_2 = -6 ;
27742776pub const JS_TAG_MODULE : _bindgen_ty_2 = -3 ;
27752777pub const JS_TAG_FUNCTION_BYTECODE : _bindgen_ty_2 = -2 ;
27762778pub const JS_TAG_OBJECT : _bindgen_ty_2 = -1 ;
@@ -2843,6 +2845,16 @@ pub type JSCFunctionData = ::std::option::Option<
28432845 func_data : * mut JSValue ,
28442846 ) -> JSValue ,
28452847> ;
2848+ pub type JSCClosure = :: std:: option:: Option <
2849+ unsafe extern "C" fn (
2850+ ctx : * mut JSContext ,
2851+ this_val : JSValue ,
2852+ argc : :: std:: os:: raw:: c_int ,
2853+ argv : * mut JSValue ,
2854+ magic : :: std:: os:: raw:: c_int ,
2855+ opaque : * mut :: std:: os:: raw:: c_void ,
2856+ ) -> JSValue ,
2857+ > ;
28462858#[ repr( C ) ]
28472859#[ derive( Debug , Copy , Clone ) ]
28482860pub struct JSMallocFunctions {
@@ -3229,6 +3241,9 @@ unsafe extern "C" {
32293241unsafe extern "C" {
32303242 pub fn JS_DupAtom ( ctx : * mut JSContext , v : JSAtom ) -> JSAtom ;
32313243}
3244+ unsafe extern "C" {
3245+ pub fn JS_DupAtomRT ( rt : * mut JSRuntime , v : JSAtom ) -> JSAtom ;
3246+ }
32323247unsafe extern "C" {
32333248 pub fn JS_FreeAtom ( ctx : * mut JSContext , v : JSAtom ) ;
32343249}
@@ -3442,6 +3457,9 @@ unsafe extern "C" {
34423457unsafe extern "C" {
34433458 pub fn JS_IsRegisteredClass ( rt : * mut JSRuntime , class_id : JSClassID ) -> bool ;
34443459}
3460+ unsafe extern "C" {
3461+ pub fn JS_GetClassName ( rt : * mut JSRuntime , class_id : JSClassID ) -> JSAtom ;
3462+ }
34453463unsafe extern "C" {
34463464 pub fn JS_NewNumber ( ctx : * mut JSContext , d : f64 ) -> JSValue ;
34473465}
@@ -3630,7 +3648,7 @@ unsafe extern "C" {
36303648 ) -> JSValue ;
36313649}
36323650unsafe extern "C" {
3633- pub fn JS_NewTwoByteString ( ctx : * mut JSContext , buf : * const u16 , len : usize ) -> JSValue ;
3651+ pub fn JS_NewStringUTF16 ( ctx : * mut JSContext , buf : * const u16 , len : usize ) -> JSValue ;
36343652}
36353653unsafe extern "C" {
36363654 pub fn JS_NewAtomString ( ctx : * mut JSContext , str_ : * const :: std:: os:: raw:: c_char ) -> JSValue ;
@@ -3649,9 +3667,22 @@ unsafe extern "C" {
36493667 cesu8 : bool ,
36503668 ) -> * const :: std:: os:: raw:: c_char ;
36513669}
3670+ unsafe extern "C" {
3671+ pub fn JS_ToCStringLenUTF16 ( ctx : * mut JSContext , plen : * mut usize , val1 : JSValue )
3672+ -> * const u16 ;
3673+ }
36523674unsafe extern "C" {
36533675 pub fn JS_FreeCString ( ctx : * mut JSContext , ptr : * const :: std:: os:: raw:: c_char ) ;
36543676}
3677+ unsafe extern "C" {
3678+ pub fn JS_FreeCStringRT ( rt : * mut JSRuntime , ptr : * const :: std:: os:: raw:: c_char ) ;
3679+ }
3680+ unsafe extern "C" {
3681+ pub fn JS_FreeCStringUTF16 ( ctx : * mut JSContext , ptr : * const u16 ) ;
3682+ }
3683+ unsafe extern "C" {
3684+ pub fn JS_FreeCStringRT_UTF16 ( rt : * mut JSRuntime , ptr : * const u16 ) ;
3685+ }
36553686unsafe extern "C" {
36563687 pub fn JS_NewObjectProtoClass (
36573688 ctx : * mut JSContext ,
@@ -3742,6 +3773,9 @@ unsafe extern "C" {
37423773unsafe extern "C" {
37433774 pub fn JS_GetProxyHandler ( ctx : * mut JSContext , proxy : JSValue ) -> JSValue ;
37443775}
3776+ unsafe extern "C" {
3777+ pub fn JS_NewProxy ( ctx : * mut JSContext , target : JSValue , handler : JSValue ) -> JSValue ;
3778+ }
37453779unsafe extern "C" {
37463780 pub fn JS_NewDate ( ctx : * mut JSContext , epoch_ms : f64 ) -> JSValue ;
37473781}
@@ -4141,10 +4175,11 @@ unsafe extern "C" {
41414175 sf : * const JSSharedArrayBufferFunctions ,
41424176 ) ;
41434177}
4178+ pub const JSPromiseStateEnum_JS_PROMISE_NOT_A_PROMISE : JSPromiseStateEnum = -1 ;
41444179pub const JSPromiseStateEnum_JS_PROMISE_PENDING : JSPromiseStateEnum = 0 ;
41454180pub const JSPromiseStateEnum_JS_PROMISE_FULFILLED : JSPromiseStateEnum = 1 ;
41464181pub const JSPromiseStateEnum_JS_PROMISE_REJECTED : JSPromiseStateEnum = 2 ;
4147- pub type JSPromiseStateEnum = :: std:: os:: raw:: c_uint ;
4182+ pub type JSPromiseStateEnum = :: std:: os:: raw:: c_int ;
41484183unsafe extern "C" {
41494184 pub fn JS_NewPromiseCapability ( ctx : * mut JSContext , resolving_funcs : * mut JSValue ) -> JSValue ;
41504185}
@@ -4240,6 +4275,21 @@ pub type JSModuleLoaderFunc = ::std::option::Option<
42404275 opaque : * mut :: std:: os:: raw:: c_void ,
42414276 ) -> * mut JSModuleDef ,
42424277> ;
4278+ pub type JSModuleLoaderFunc2 = :: std:: option:: Option <
4279+ unsafe extern "C" fn (
4280+ ctx : * mut JSContext ,
4281+ module_name : * const :: std:: os:: raw:: c_char ,
4282+ opaque : * mut :: std:: os:: raw:: c_void ,
4283+ attributes : JSValue ,
4284+ ) -> * mut JSModuleDef ,
4285+ > ;
4286+ pub type JSModuleCheckSupportedImportAttributes = :: std:: option:: Option <
4287+ unsafe extern "C" fn (
4288+ ctx : * mut JSContext ,
4289+ opaque : * mut :: std:: os:: raw:: c_void ,
4290+ attributes : JSValue ,
4291+ ) -> :: std:: os:: raw:: c_int ,
4292+ > ;
42434293unsafe extern "C" {
42444294 pub fn JS_SetModuleLoaderFunc (
42454295 rt : * mut JSRuntime ,
@@ -4248,6 +4298,15 @@ unsafe extern "C" {
42484298 opaque : * mut :: std:: os:: raw:: c_void ,
42494299 ) ;
42504300}
4301+ unsafe extern "C" {
4302+ pub fn JS_SetModuleLoaderFunc2 (
4303+ rt : * mut JSRuntime ,
4304+ module_normalize : JSModuleNormalizeFunc ,
4305+ module_loader : JSModuleLoaderFunc2 ,
4306+ module_check_attrs : JSModuleCheckSupportedImportAttributes ,
4307+ opaque : * mut :: std:: os:: raw:: c_void ,
4308+ ) ;
4309+ }
42514310unsafe extern "C" {
42524311 pub fn JS_GetImportMeta ( ctx : * mut JSContext , m : * mut JSModuleDef ) -> JSValue ;
42534312}
@@ -4257,6 +4316,16 @@ unsafe extern "C" {
42574316unsafe extern "C" {
42584317 pub fn JS_GetModuleNamespace ( ctx : * mut JSContext , m : * mut JSModuleDef ) -> JSValue ;
42594318}
4319+ unsafe extern "C" {
4320+ pub fn JS_SetModulePrivateValue (
4321+ ctx : * mut JSContext ,
4322+ m : * mut JSModuleDef ,
4323+ val : JSValue ,
4324+ ) -> :: std:: os:: raw:: c_int ;
4325+ }
4326+ unsafe extern "C" {
4327+ pub fn JS_GetModulePrivateValue ( ctx : * mut JSContext , m : * mut JSModuleDef ) -> JSValue ;
4328+ }
42604329pub type JSJobFunc = :: std:: option:: Option <
42614330 unsafe extern "C" fn (
42624331 ctx : * mut JSContext ,
@@ -4490,6 +4559,19 @@ unsafe extern "C" {
44904559 data : * mut JSValue ,
44914560 ) -> JSValue ;
44924561}
4562+ pub type JSCClosureFinalizerFunc =
4563+ :: std:: option:: Option < unsafe extern "C" fn ( arg1 : * mut :: std:: os:: raw:: c_void ) > ;
4564+ unsafe extern "C" {
4565+ pub fn JS_NewCClosure (
4566+ ctx : * mut JSContext ,
4567+ func : JSCClosure ,
4568+ name : * const :: std:: os:: raw:: c_char ,
4569+ opaque_finalize : JSCClosureFinalizerFunc ,
4570+ length : :: std:: os:: raw:: c_int ,
4571+ magic : :: std:: os:: raw:: c_int ,
4572+ opaque : * mut :: std:: os:: raw:: c_void ,
4573+ ) -> JSValue ;
4574+ }
44934575unsafe extern "C" {
44944576 pub fn JS_SetConstructor ( ctx : * mut JSContext , func_obj : JSValue , proto : JSValue ) ;
44954577}
0 commit comments