Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Pass an int to a node.js addon
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dean Mao  
View profile  
 More options Oct 26 2012, 9:34 am
From: Dean Mao <dean...@gmail.com>
Date: Fri, 26 Oct 2012 06:33:47 -0700
Local: Fri, Oct 26 2012 9:33 am
Subject: Re: [nodejs] Pass an int to a node.js addon

If you want some crazy v8 type conversion library, there is v8-juice:
http://code.google.com/p/v8-juice/wiki/ConvertingTypes

I've not used it before, but it came highly recommended from others.  It's
not too useful for converting one type, but if you have composite types, it
might make things easier.

On Fri, Oct 26, 2012 at 5:00 AM, NodeNinja <aeon6f...@gmail.com> wrote:

>> int length = args[0]->Int32Value();
>> if (length <= 0) {
>>   return ThrowException(Exception::**Error(String::New("BAM")));
>> }
>> unsigned char* buffer = new unsigned char[length];

> Thanks for that info Ben,

> Further to that is there a way to pass and return array of pointers I have
> something like (unsigned int **)

>  --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> 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 post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.