Skip to content

Commit

Permalink
Prefix Init C function to avoid conflicts with other native libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanahsmith committed Jun 21, 2022
1 parent da7f43c commit 199c109
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion isolate.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type HeapStatistics struct {
// Context, rather than creating a new default Isolate.
func NewIsolate() *Isolate {
v8once.Do(func() {
C.Init()
C.V8goInit()
})
iso := &Isolate{
ptr: C.NewIsolate(),
Expand Down
2 changes: 1 addition & 1 deletion v8go.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ extern "C" {
ISOLATE_SCOPE(iso); \
m_ctx* ctx = isolateInternalContext(iso);

void Init() {
void V8goInit() {
#ifdef _WIN32
V8::InitializeExternalStartupData(".");
#endif
Expand Down
2 changes: 1 addition & 1 deletion v8go.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ typedef struct {
int sign_bit;
} ValueBigInt;

extern void Init();
extern void V8goInit();
extern IsolatePtr NewIsolate();
extern void IsolatePerformMicrotaskCheckpoint(IsolatePtr ptr);
extern void IsolateDispose(IsolatePtr ptr);
Expand Down

0 comments on commit 199c109

Please sign in to comment.