mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-25 17:38:09 +02:00
PHPC-405: Additional zval* to zval changes
This commit is contained in:
committed by
Derick Rethans
parent
3ce6205889
commit
e85604f2bb
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user