Rod, thanks, this is exactly what I was looking for. On Friday, September 26, 2014 5:24:56 AM UTC+2, Rod Vagg wrote: > > > Switch to the v0.12 branch and you'll find up to date docs: > https://github.com/joyent/node/blob/v0.12/doc/api/addons.markdown > > Note also that I only recently updated the node-addon-examples repo so it > now has these examples implemented in parallel for v0.10, v0.12 and nan: > https://github.com/rvagg/node-addon-examples > > I removed the async example but will be working on putting a new one up > some time. > > -- Rod > > > On Thursday, 25 September 2014 20:08:26 UTC+10, blazs wrote: >> >> Thanks, I'll keep that in mind. And there is no documentation like Addons >> v0.10 <http://nodejs.org/api/addons.html> for the 0.12 version? >> >> On Tuesday, September 23, 2014 7:20:19 PM UTC+2, Fedor Indutny wrote: >>> >>> I'd certainly recommend using nan. >>> >>> However, in the new V8 API it'll look this way: >>> >>> args.GetReturnValue().Set(...) >>> >>> On Tue, Sep 23, 2014 at 7:06 PM, blazs <[email protected]> wrote: >>> >>>> Thanks, this is helpful! Dramatic changes in the V8 API are giving me a >>>> headache. >>>> >>>> Suppose I have the following scenario. I wrapped a C++ object v of >>>> type NodeJsVec and I want an operation shuffle() so that var w = >>>> v.shuffle(); gives me a new vector w, which is a randomly shuffled >>>> vector v. How do I return a new instance from C++ callback? (Just to >>>> be clear: I want w and v to be different vectors, and I want the C++ >>>> callback for v.shuffle() to create the new vector.) >>>> >>>> On Tuesday, September 23, 2014 4:35:16 PM UTC+2, Fedor Indutny wrote: >>>>> >>>>> Hello! >>>>> >>>>> Have you seen: >>>>> >>>>> https://github.com/joyent/node/blob/master/doc/api/ >>>>> addons.markdown#hello-world >>>>> >>>>> Cheers. >>>>> >>>>> On Tue, Sep 23, 2014 at 11:48 AM, blazs <[email protected]> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I am looking for Node.js C++ Addon examples, written for v0.12 >>>>>> version of the Node.js --- the one that uses V8 version 3.22. There are >>>>>> major changes between V8 3.14 and V8 3.22, and I'd like to update my >>>>>> code >>>>>> for V8 3.22 as soon as possible. Examples on the official GitHub >>>>>> repository are very simple and don't cover scenarios where, for >>>>>> instance, I >>>>>> would like to wrap a C++ object, say a vector, then expose functions on >>>>>> it >>>>>> that would allows one to create copies of that vector, etc. >>>>>> >>>>>> Are there any Node.js v0.12 C++ Addon examples available? >>>>>> >>>>>> Blaz. >>>>>> >>>>>> -- >>>>>> Job board: http://jobs.nodejs.org/ >>>>>> New group rules: https://gist.github.com/othiym23/9886289#file- >>>>>> moderation-policy-md >>>>>> Old group rules: https://github.com/joyent/node/wiki/Mailing-List- >>>>>> Posting-Guidelines >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "nodejs" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To post to this group, send email to [email protected]. >>>>>> To view this discussion on the web visit https://groups.google.com/d/ >>>>>> msgid/nodejs/ec4dc460-b824-491f-a179-5a508ff76684%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/nodejs/ec4dc460-b824-491f-a179-5a508ff76684%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>
-- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/89078465-4d5d-46d2-8d0a-8bc97aea9916%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
