mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00: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:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user