Skip to content

Commit

Permalink
Fix legacy libv8 on conda-forge and centos-7
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Feb 2, 2025
1 parent 8d53127 commit b81bf24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: V8
Type: Package
Title: Embedded JavaScript and WebAssembly Engine for R
Version: 6.0.0
Version: 6.0.1
Authors@R: c(
person("Jeroen", "Ooms", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0002-4035-0289")),
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
6.0.1
- Fix build for legacy libv8 versions on CondaForge and Centos-7

6.0.0
- Experimental support for dynamic ES modules
- Linux: update static libv8 to version 11.9
Expand Down
4 changes: 2 additions & 2 deletions src/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#endif
#endif

#if defined(NODEJS_LTS_API) && NODEJS_LTS_API < 18
#if V8_VERSION_TOTAL < 908 || NODEJS_LTS_API == 16
#define FixedArrayParam
#else
#define FixedArrayParam ,v8::Local<v8::FixedArray> import_arributes
Expand Down Expand Up @@ -129,7 +129,7 @@ static v8::MaybeLocal<v8::Promise> ResolveDynamicModuleCallback(
}

static v8::ScriptOrigin make_origin(std::string filename){
#if defined(NODEJS_LTS_API) && NODEJS_LTS_API < 18
#if V8_VERSION_TOTAL < 908 || NODEJS_LTS_API == 16
return v8::ScriptOrigin(ToJSString( filename.c_str()), v8::Integer::New(isolate, 0),
v8::Integer::New(isolate, 0), v8::False(isolate), v8::Local<v8::Integer>(),
v8::Local<v8::Value>(), v8::False(isolate), v8::False(isolate), v8::True(isolate));
Expand Down

0 comments on commit b81bf24

Please sign in to comment.