PHPC-405: Additional zval* to zval changes

This commit is contained in:
Jeremy Mikola
2015-11-07 17:28:44 -05:00
committed by Derick Rethans
parent 3ce6205889
commit e85604f2bb
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -159,8 +159,13 @@ HashTable *php_phongo_javascript_get_debug_info(zval *object, int *is_temp TSRML
php_phongo_bson_state state = PHONGO_BSON_STATE_INITIALIZER;
if (bson_to_zval_ex(bson_get_data(intern->document), intern->document->len, &state)) {
#if PHP_VERSION_ID >= 70000
Z_ADDREF(state.zchild);
ADD_ASSOC_ZVAL_EX(&retval, "scope", &state.zchild);
#else
Z_ADDREF_P(state.zchild);
add_assoc_zval_ex(&retval, ZEND_STRS("scope"), state.zchild);
ADD_ASSOC_ZVAL_EX(&retval, "scope", state.zchild);
#endif
} else {
ADD_ASSOC_NULL_EX(&retval, "scope");
}
+4
View File
@@ -132,7 +132,11 @@ PHP_METHOD(ReadPreference, getTagSets)
state.map.document_type = PHONGO_TYPEMAP_NATIVE_ARRAY;
bson_to_zval_ex(bson_get_data(&intern->read_preference->tags), intern->read_preference->tags.len, &state);
#if PHP_VERSION_ID >= 70000
RETURN_ZVAL(&state.zchild, 0, 1);
#else
RETURN_ZVAL(state.zchild, 0, 1);
#endif
} else {
RETURN_NULL();
}