Skip to content

fix: use Nan::Utf8String instead of v8::String::Utf8Value (fixes #37) #38

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
Apr 30, 2019

Conversation

jacobq
Copy link
Contributor

@jacobq jacobq commented Apr 29, 2019

It looks like using Nan::Utf8String instead of v8::String::Utf8Value like we did on node-serialport/#1843 will fix #37 (and hopefully not break anything in the process).

node_modules\diskusage\src\main.cpp(26): error C2440: '<function-style-cast>': cannot convert from 'v8::Local<v8::Value>' to 'v8::String::Utf8Value' [C:\Users\User\Documents\tmp\node_modules\diskusage\build\diskusage.vcxproj]
  c:\users\User\documents\tmp\node_modules\diskusage\src\main.cpp(26): note: No constructor could take the source type, or constructor overload resolution was ambiguous

This fixes another incompatibility problem with node v12.0.0:

```
node_modules\diskusage\src\main.cpp(26): error C2440: '<function-style-cast>': cannot convert from 'v8::Local<v8::Value>' to 'v8::String::Utf8Value' [C:\Users\User\Documents\tmp\node_modules\diskusage\build\diskusage.vcxproj]
  c:\users\User\documents\tmp\node_modules\diskusage\src\main.cpp(26): note: No constructor could take the source type, or constructor overload resolution was ambiguous
```
@jduncanator jduncanator merged commit a302c21 into jduncanator:master Apr 30, 2019
@jduncanator
Copy link
Owner

Tested and works back to Node v0.10.48, thanks!

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.

Fails to compile on Node v12.0.0
2 participants