node-i2c
node-i2c copied to clipboard
Make node-i2c compile with Node 4.
- v8::Buffer::New returns an instance of v8::MaybeLocal<>
- an instance of v8::MaybeLocalv8::Object needs to be asked for the actual local by calling v8::MaybeLocalv8::Object::ToLocalChecked()
NaN (https://github.com/nodejs/nan) abstracts such native incompatabilities that are introduced with every new v8 version
+1 to get a working solution merged!
Thanks for this pr! Moving forward I'm looking to integrate NaN so these issues don't arise again. Unfortunately, using NaN requires almost a full re-write.
@kelly: I would encourage you to merge the PR rather than waiting for the time to do a re-write for NaN. While it is a bit of a hack, when one uses your module because a dependency from npm, it will nearly always break those modules if they are running a currently supported version of node.
May this change: https://github.com/kelly/node-i2c/pull/96
supersede this PR https://github.com/kelly/node-i2c/pull/70
I didn't check on node-4
May you try to submit to this fork: https://github.com/abandonware/node-i2c