Skip to content
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

tools/1to2.js fails to generate proper source #441

Open
Gottox opened this issue Sep 6, 2015 · 1 comment
Open

tools/1to2.js fails to generate proper source #441

Gottox opened this issue Sep 6, 2015 · 1 comment

Comments

@Gottox
Copy link

Gottox commented Sep 6, 2015

I'm using NAN-1 with https://github.com/Gottox/child_pty. In Gottox/child_pty#7 it came up, that NAN-2 breaks the build process.

I tried to use the 1to2.js script, but it generates wrong constructs, such as:

-               if(obj->Has(columns))
-                       w->ws_col = obj->Get(columns)->Uint32Value();
-               if(obj->Has(rows))
-                       w->ws_row = obj->Get(rows)->Uint32Value();
+               NanHas(if(obj, columns))
+                       w->ws_col = NanGet(obj, columns)->Uint32Value();
+               NanHas(if(obj, rows))
+                       w->ws_row = NanGet(obj, rows)->Uint32Value();

Furthermore, I'd really like to have a comprehensive migration guide. (#402)

@kkoopa
Copy link
Collaborator

kkoopa commented Sep 9, 2015

Yeah, it has not been updated. The main thing that needs changing is the replacement of Nan prefix with Nan namespace, but I don't really feel like doing it. I'll merge a PR if someone wants to update it.

You can try this bash script instead https://gist.github.com/thlorenz/7e9d8ad15566c99fd116

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

No branches or pull requests

2 participants