aboutsummaryrefslogtreecommitdiff
path: root/php/ext/google/protobuf/storage.c
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2018-07-12 12:34:18 -0700
committerGitHub <noreply@github.com>2018-07-12 12:34:18 -0700
commit22503a01722939385a7584c3b65f1c43dc5b2ef8 (patch)
treed6e5dbe9f854052d729dfd29f28929068be531e0 /php/ext/google/protobuf/storage.c
parente529d162838f747362c123ec10e87ebe3970c677 (diff)
downloadprotobuf-22503a01722939385a7584c3b65f1c43dc5b2ef8.tar.gz
protobuf-22503a01722939385a7584c3b65f1c43dc5b2ef8.tar.bz2
protobuf-22503a01722939385a7584c3b65f1c43dc5b2ef8.zip
fix for API change in PHP 7.3 (#4898)
Diffstat (limited to 'php/ext/google/protobuf/storage.c')
-rw-r--r--php/ext/google/protobuf/storage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/php/ext/google/protobuf/storage.c b/php/ext/google/protobuf/storage.c
index e7910c85..a60fbe39 100644
--- a/php/ext/google/protobuf/storage.c
+++ b/php/ext/google/protobuf/storage.c
@@ -200,7 +200,7 @@ bool native_slot_set_by_array(upb_fieldtype_t type,
}
#else
DEREF(memory, zval*) = value;
- ++GC_REFCOUNT(Z_OBJ_P(value));
+ GC_ADDREF(Z_OBJ_P(value));
#endif
break;
}
@@ -251,7 +251,7 @@ bool native_slot_set_by_map(upb_fieldtype_t type, const zend_class_entry* klass,
}
#else
DEREF(memory, zend_object*) = Z_OBJ_P(value);
- ++GC_REFCOUNT(Z_OBJ_P(value));
+ GC_ADDREF(Z_OBJ_P(value));
#endif
break;
}
@@ -428,7 +428,7 @@ void native_slot_get_by_map_value(upb_fieldtype_t type, const void* memory,
ZVAL_ZVAL(CACHED_PTR_TO_ZVAL_PTR(cache), value, 1, 0);
}
#else
- ++GC_REFCOUNT(*(zend_object**)memory);
+ GC_ADDREF(*(zend_object**)memory);
ZVAL_OBJ(cache, *(zend_object**)memory);
#endif
return;