Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions 12 generate/templates/partials/convert_from_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,10 @@
{%endif%}
}
else {
{%if cType|isDoublePointer %}
from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info[{{ jsArg }}]->ToObject())->GetRefValue();
{%else%}
from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info[{{ jsArg }}]->ToObject())->GetValue();
{%endif%}
{%if cType|isDoublePointer %}*{%endif%}from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info[{{ jsArg }}]->ToObject())->GetValue();
}
{%else%}
{%if cType|isDoublePointer %}
from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info[{{ jsArg }}]->ToObject())->GetRefValue();
{%else%}
from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info[{{ jsArg }}]->ToObject())->GetValue();
{%endif%}
{%if cType|isDoublePointer %}*{%endif%}from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info[{{ jsArg }}]->ToObject())->GetValue();
{%endif%}

{%if isBoolean %}
Expand Down
4 changes: 0 additions & 4 deletions 4 generate/templates/templates/class_content.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ using namespace node;
return this->raw;
}

{{ cType }} **{{ cppClassName }}::GetRefValue() {
return this->raw == NULL ? NULL : &this->raw;
}

void {{ cppClassName }}::ClearValue() {
this->raw = NULL;
}
Expand Down
1 change: 0 additions & 1 deletion 1 generate/templates/templates/class_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class {{ cppClassName }} : public Nan::ObjectWrap {

{%if cType%}
{{ cType }} *GetValue();
{{ cType }} **GetRefValue();
void ClearValue();

static Local<v8::Value> New(void *raw, bool selfFreeing);
Expand Down
6 changes: 1 addition & 5 deletions 6 generate/templates/templates/struct_content.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ using namespace std;
{% endif %}
{% endif %}
{% endeach %}

if (this->selfFreeing) {
free(this->raw);
}
Expand Down Expand Up @@ -143,10 +143,6 @@ Local<v8::Value> {{ cppClassName }}::New(void* raw, bool selfFreeing) {
return this->raw;
}

{{ cType }} **{{ cppClassName }}::GetRefValue() {
return this->raw == NULL ? NULL : &this->raw;
}

void {{ cppClassName }}::ClearValue() {
this->raw = NULL;
}
Expand Down
1 change: 0 additions & 1 deletion 1 generate/templates/templates/struct_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class {{ cppClassName }} : public Nan::ObjectWrap {
static void InitializeComponent (Local<v8::Object> target);

{{ cType }} *GetValue();
{{ cType }} **GetRefValue();
void ClearValue();

static Local<v8::Value> New(void *raw, bool selfFreeing);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.