mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2025-10-12 15:35:00 +00:00
structure, layout and automation
This commit is contained in:
21
node_modules/node-sass/src/create_string.cpp
generated
vendored
Normal file
21
node_modules/node-sass/src/create_string.cpp
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
#include <nan.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "create_string.h"
|
||||
|
||||
char* create_string(Nan::MaybeLocal<v8::Value> maybevalue) {
|
||||
v8::Local<v8::Value> value;
|
||||
|
||||
if (maybevalue.ToLocal(&value)) {
|
||||
if (value->IsNull() || !value->IsString()) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Nan::Utf8String string(value);
|
||||
char *str = (char *)malloc(string.length() + 1);
|
||||
strcpy(str, *string);
|
||||
return str;
|
||||
}
|
Reference in New Issue
Block a user