unsigned char* random(int length);
To use this as an add-on I modified it to
Handle<Value> random(const Arguments& args) {
if(args[0]->IsInt32()){
Local<Int32> length = args[0]->ToInt32();
// Now here I want to create an array like this "unsigned char* buffer =
new unsigned char[length];" using the length variable
// but it gives me an error saying length is undefined
//1. how do I convert Local<Int32> to int ???
// 2. How to return the array from this function??
}
}
--
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