Skip to content

Commit

Permalink
hack hack
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Oct 5, 2024
1 parent ca66213 commit af5d228
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
#endif

#if !defined(ISNODEJS) || NODEJS_LTS_API > 16
using FixedArrayType = v8::Local<v8::FixedArray>;
#else
using FixedArrayType = int;
#define FixedArrayStub ,v8::Local<v8::FixedArray> import_attributes
#endif

#if V8_VERSION_TOTAL < 803
Expand Down Expand Up @@ -83,10 +81,10 @@ static void fatal_cb(const char* location, const char* message){

static v8::Local<v8::Module> read_module(std::string filename, v8::Local<v8::Context> context);

static v8::MaybeLocal<v8::Module> ResolveModuleCallback(v8::Local<v8::Context> context,
v8::Local<v8::String> specifier,
FixedArrayType import_attributes,
v8::Local<v8::Module> referrer) {
static v8::MaybeLocal<v8::Module> ResolveModuleCallback(v8::Local<v8::Context> context
,v8::Local<v8::String> specifier
FixedArrayStub
,v8::Local<v8::Module> referrer) {
v8::String::Utf8Value name(context->GetIsolate(), specifier);
return read_module(*name, context);
}
Expand Down Expand Up @@ -118,9 +116,8 @@ static v8::MaybeLocal<v8::Promise> ResolveDynamicModuleCallback(
#else
v8::Local<v8::ScriptOrModule> referrer,
#endif
v8::Local<v8::String> specifier,
FixedArrayType import_assertions

v8::Local<v8::String> specifier
FixedArrayStub
) {
return dynamic_module_loader(context, specifier);
}
Expand Down

0 comments on commit af5d228

Please sign in to comment.