Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
update bindings to use NanNew for iojs
Browse files Browse the repository at this point in the history
  • Loading branch information
mnutt committed Jan 16, 2015
1 parent 452c698 commit 0887f83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ void prepare_import_results(Local<Value> returned_value, sass_context_wrapper* c
continue;

Local<Object> object = Local<Object>::Cast(value);
char* path = CreateString(object->Get(String::New("file")));
char* contents = CreateString(object->Get(String::New("contents")));
char* path = CreateString(object->Get(NanNew<String>("file")));
char* contents = CreateString(object->Get(NanNew<String>("contents")));

ctx_w->imports[i] = sass_make_import_entry(path, (!contents || contents[0] == '\0') ? 0 : strdup(contents), 0);
}
}
else if (returned_value->IsObject()) {
ctx_w->imports = sass_make_import_list(1);
Local<Object> object = Local<Object>::Cast(returned_value);
char* path = CreateString(object->Get(String::New("file")));
char* contents = CreateString(object->Get(String::New("contents")));
char* path = CreateString(object->Get(NanNew<String>("file")));
char* contents = CreateString(object->Get(NanNew<String>("contents")));

ctx_w->imports[0] = sass_make_import_entry(path, (!contents || contents[0] == '\0') ? 0 : strdup(contents), 0);
}
Expand Down

0 comments on commit 0887f83

Please sign in to comment.