Skip to content

Fix async_pi_estimate deprecation #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2018

Conversation

amir-s
Copy link
Contributor

@amir-s amir-s commented Feb 24, 2018

👋
Since v8::Local<v8::Value> Call(int argc, v8::Local<v8::Value> argv[]); is now deprecated (#733), I'm updating the example to use the new API.

before:

> node-gyp rebuild

  CXX(target) Release/obj.target/addon/addon.o
  CXX(target) Release/obj.target/addon/pi_est.o
  CXX(target) Release/obj.target/addon/sync.o
  CXX(target) Release/obj.target/addon/async.o
../async.cc:50:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(2, argv);
              ^
../node_modules/nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../node_modules/nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
1 warning generated.
  SOLINK_MODULE(target) Release/addon.node

after:

> node-gyp rebuild

  CXX(target) Release/obj.target/addon/addon.o
  CXX(target) Release/obj.target/addon/pi_est.o
  CXX(target) Release/obj.target/addon/sync.o
  CXX(target) Release/obj.target/addon/async.o
  SOLINK_MODULE(target) Release/addon.node

@amir-s amir-s force-pushed the fix_example_deprecation branch from 6a9ccc7 to ea83a21 Compare February 24, 2018 18:50
@kkoopa
Copy link
Collaborator

kkoopa commented Feb 25, 2018

Good catch. Thank you.

@kkoopa kkoopa merged commit 1a1971e into nodejs:master Feb 25, 2018
@amir-s amir-s deleted the fix_example_deprecation branch February 25, 2018 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants