0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 22:51:51 +00:00

handle new IS_INDIRECT and IS_UNDEF in zval->js export

This commit is contained in:
Stefan Siegl 2015-10-02 23:19:32 +02:00
parent 0a93aa2306
commit 8a3124ee2a

View File

@ -105,6 +105,9 @@ v8::Handle<v8::Value> zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC)
long v;
zend_class_entry *ce;
if(Z_TYPE_P(value) == IS_INDIRECT)
value = Z_INDIRECT_P(value);
switch (Z_TYPE_P(value))
{
case IS_ARRAY:
@ -154,10 +157,14 @@ v8::Handle<v8::Value> zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC)
jsValue = V8JS_FALSE();
break;
default:
case IS_NULL:
jsValue = V8JS_NULL;
break;
case IS_UNDEF:
default:
/* undefined -> return v8::Value left empty */
break;
}
return jsValue;
}