Skip to content

Commit

Permalink
[unreal]fix quickjs compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Aug 17, 2023
1 parent 598f237 commit 2cd6ffe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@

namespace puerts
{
#if !defined(WITH_QUICKJS)
void LoadPesapiDll(const v8::FunctionCallbackInfo<v8::Value>& Info);
#endif

FJsEnvImpl::FJsEnvImpl(const FString& ScriptRoot)
: FJsEnvImpl(std::make_shared<DefaultJSModuleLoader>(ScriptRoot), std::make_shared<FDefaultLogger>(), -1, nullptr, FString(),
Expand Down Expand Up @@ -585,10 +587,12 @@ FJsEnvImpl::FJsEnvImpl(std::shared_ptr<IJSModuleLoader> InModuleLoader, std::sha
v8::FunctionTemplate::New(Isolate, ToCPtrArray)->GetFunction(Context).ToLocalChecked())
.Check();

#if !defined(WITH_QUICKJS)
PuertsObj
->Set(Context, FV8Utils::ToV8String(Isolate, "load"),
v8::FunctionTemplate::New(Isolate, LoadPesapiDll)->GetFunction(Context).ToLocalChecked())
.Check();
#endif

FString DllExt =
#if PLATFORM_WINDOWS
Expand Down

0 comments on commit 2cd6ffe

Please sign in to comment.