mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 23:51:51 +00:00
prefer V8JS_ZSTR over V8JS_STRL(Z_STRVAL), refs #180
This commit is contained in:
parent
d9eb68b6f9
commit
227ad57163
@ -129,7 +129,7 @@ v8::Handle<v8::Value> zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC)
|
||||
break;
|
||||
|
||||
case IS_STRING:
|
||||
jsValue = V8JS_STRL(Z_STRVAL_P(value), Z_STRLEN_P(value));
|
||||
jsValue = V8JS_ZSTR(Z_STR_P(value));
|
||||
break;
|
||||
|
||||
case IS_LONG:
|
||||
|
@ -325,7 +325,7 @@ V8JS_METHOD(require)
|
||||
// Set script identifier
|
||||
v8::Local<v8::String> sname = V8JS_SYM("require");
|
||||
|
||||
v8::Local<v8::String> source = V8JS_STRL(Z_STRVAL(module_code), Z_STRLEN(module_code));
|
||||
v8::Local<v8::String> source = V8JS_ZSTR(Z_STR(module_code));
|
||||
zval_ptr_dtor(&module_code);
|
||||
|
||||
// Create and compile script
|
||||
|
@ -67,7 +67,7 @@ static int v8js_v8object_has_property(zval *object, zval *member, int has_set_ex
|
||||
{
|
||||
|
||||
v8::Local<v8::Object> jsObj = v8obj->ToObject();
|
||||
v8::Local<v8::String> jsKey = V8JS_STRL(Z_STRVAL_P(member), Z_STRLEN_P(member));
|
||||
v8::Local<v8::String> jsKey = V8JS_ZSTR(Z_STR_P(member));
|
||||
v8::Local<v8::Value> jsVal;
|
||||
|
||||
/* Skip any prototype properties */
|
||||
@ -126,7 +126,7 @@ static zval *v8js_v8object_read_property(zval *object, zval *member, int type, v
|
||||
{
|
||||
|
||||
v8::Local<v8::Object> jsObj = v8obj->ToObject();
|
||||
v8::Local<v8::String> jsKey = V8JS_STRL(Z_STRVAL_P(member), Z_STRLEN_P(member));
|
||||
v8::Local<v8::String> jsKey = V8JS_ZSTR(Z_STR_P(member));
|
||||
v8::Local<v8::Value> jsVal;
|
||||
|
||||
/* Skip any prototype properties */
|
||||
|
Loading…
Reference in New Issue
Block a user