From af5d22840099dae60784105a47e8957383a8d8f4 Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Sat, 5 Oct 2024 23:15:56 +0200 Subject: [PATCH] hack hack --- src/bindings.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/bindings.cpp b/src/bindings.cpp index 3e9aeed..c7a4ea3 100644 --- a/src/bindings.cpp +++ b/src/bindings.cpp @@ -16,9 +16,7 @@ #endif #if !defined(ISNODEJS) || NODEJS_LTS_API > 16 -using FixedArrayType = v8::Local; -#else -using FixedArrayType = int; +#define FixedArrayStub ,v8::Local import_attributes #endif #if V8_VERSION_TOTAL < 803 @@ -83,10 +81,10 @@ static void fatal_cb(const char* location, const char* message){ static v8::Local read_module(std::string filename, v8::Local context); -static v8::MaybeLocal ResolveModuleCallback(v8::Local context, - v8::Local specifier, - FixedArrayType import_attributes, - v8::Local referrer) { +static v8::MaybeLocal ResolveModuleCallback(v8::Local context + ,v8::Local specifier + FixedArrayStub + ,v8::Local referrer) { v8::String::Utf8Value name(context->GetIsolate(), specifier); return read_module(*name, context); } @@ -118,9 +116,8 @@ static v8::MaybeLocal ResolveDynamicModuleCallback( #else v8::Local referrer, #endif - v8::Local specifier, - FixedArrayType import_assertions - + v8::Local specifier + FixedArrayStub ) { return dynamic_module_loader(context, specifier); }