0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-23 04:51:53 +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; 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;
} }