mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-23 09:31:52 +00:00
handle new IS_INDIRECT and IS_UNDEF in zval->js export
This commit is contained in:
parent
0a93aa2306
commit
8a3124ee2a
@ -105,6 +105,9 @@ v8::Handle<v8::Value> zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC)
|
|||||||
long v;
|
long v;
|
||||||
zend_class_entry *ce;
|
zend_class_entry *ce;
|
||||||
|
|
||||||
|
if(Z_TYPE_P(value) == IS_INDIRECT)
|
||||||
|
value = Z_INDIRECT_P(value);
|
||||||
|
|
||||||
switch (Z_TYPE_P(value))
|
switch (Z_TYPE_P(value))
|
||||||
{
|
{
|
||||||
case IS_ARRAY:
|
case IS_ARRAY:
|
||||||
@ -154,10 +157,14 @@ v8::Handle<v8::Value> zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC)
|
|||||||
jsValue = V8JS_FALSE();
|
jsValue = V8JS_FALSE();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
jsValue = V8JS_NULL;
|
jsValue = V8JS_NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IS_UNDEF:
|
||||||
|
default:
|
||||||
|
/* undefined -> return v8::Value left empty */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return jsValue;
|
return jsValue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user