mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
test: fix warning in dlopen-ping-pong/binding.cc
Currently, the following compiler warning is issued: ../binding.cc:26:27: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations] const String::Utf8Value filename(args[0]); ^ This commit updates the code to use the Isolate version. PR-URL: https://github.com/nodejs/node/pull/19966 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
a486736af8
commit
bd0a690632
@ -23,7 +23,7 @@ typedef const char* (*ping)(void);
|
||||
static ping ping_func;
|
||||
|
||||
void LoadLibrary(const FunctionCallbackInfo<Value>& args) {
|
||||
const String::Utf8Value filename(args[0]);
|
||||
const String::Utf8Value filename(args.GetIsolate(), args[0]);
|
||||
void* handle = dlopen(*filename, RTLD_LAZY);
|
||||
assert(handle != nullptr);
|
||||
ping_func = reinterpret_cast<ping>(dlsym(handle, "dlopen_ping"));
|
||||
|
Loading…
Reference in New Issue
Block a user