-
Notifications
You must be signed in to change notification settings - Fork 507
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
Any plans for a migration guide? #402
Comments
converted examples in node-addon-examples may make it a bit easier (pull request is pending, but you can see nan_2.x and nan_1.x here: https://github.com/winfinit/node-addon-examples) also what helped me a lot is to look through https://github.com/nodejs/nan/tree/master/test |
The converter script in #376 (comment) was very helpful for me |
+1 |
Good hint @winfinit . Found everything I needed in the test directory. |
The biggest gotcha I've run into between nan v1 and v2 is a change to the Buffer creation methods where ownership of the underlying data is transferred. In nan v1, the "take ownership" method is In nan v2, the "take ownership" method is |
@lovell I had a bunch of memory corruption because of this exact change. Took awhile to figure it out. |
Should hopefully ease v2 upgrades - see nodejs#402
Should hopefully ease v2 upgrades - see nodejs#402
Should hopefully ease v2 upgrades - see #402
So if I use |
Supply a |
@kkoopa Ah thanks, I read over that one. Is there a nan wrapper for |
https://github.com/nodejs/nan/blob/master/nan.h#L1218 |
Great! |
Updating from NaN 1.x to 2.x is getting more harder than I thought.
The text was updated successfully, but these errors were encountered: