aboutsummaryrefslogtreecommitdiff
path: root/php/ext/google/protobuf/protobuf.h
diff options
context:
space:
mode:
authorAdam Cozzette <acozzette@google.com>2018-08-01 13:44:55 -0700
committerAdam Cozzette <acozzette@google.com>2018-08-01 13:44:55 -0700
commit94d55e529204cc8575bf1070dc1e2375dbc8a4c5 (patch)
tree20730e597f914fd2430c66b9bebe633e017a4fe0 /php/ext/google/protobuf/protobuf.h
parent3d62db3ecd5377025a458bca827ab4ca12d5c1f0 (diff)
parent48cb18e5c419ddd23d9badcfe4e9df7bde1979b2 (diff)
downloadprotobuf-94d55e529204cc8575bf1070dc1e2375dbc8a4c5.tar.gz
protobuf-94d55e529204cc8575bf1070dc1e2375dbc8a4c5.tar.bz2
protobuf-94d55e529204cc8575bf1070dc1e2375dbc8a4c5.zip
Merge branch '3.6.x' into merge-3-6-x
Diffstat (limited to 'php/ext/google/protobuf/protobuf.h')
-rw-r--r--php/ext/google/protobuf/protobuf.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h
index 3ef4c84b..9cb36dc2 100644
--- a/php/ext/google/protobuf/protobuf.h
+++ b/php/ext/google/protobuf/protobuf.h
@@ -37,7 +37,7 @@
#include "upb.h"
#define PHP_PROTOBUF_EXTNAME "protobuf"
-#define PHP_PROTOBUF_VERSION "3.6.0"
+#define PHP_PROTOBUF_VERSION "3.6.1"
#define MAX_LENGTH_OF_INT64 20
#define SIZEOF_INT64 8
@@ -50,6 +50,11 @@
// PHP7 Wrappers
// ----------------------------------------------------------------------------
+#if PHP_VERSION_ID < 70300
+#define GC_ADDREF(h) ++GC_REFCOUNT(h)
+#define GC_DELREF(h) --GC_REFCOUNT(h)
+#endif
+
#if PHP_MAJOR_VERSION < 7
#define php_proto_zend_literal const zend_literal*
@@ -500,7 +505,7 @@ static inline int php_proto_zend_hash_get_current_data_ex(HashTable* ht,
PHP_PROTO_HASHTABLE_VALUE WRAPPED_OBJ; \
WRAPPED_OBJ = OBJ_CLASS_ENTRY->create_object(OBJ_CLASS_ENTRY); \
OBJ = UNBOX_HASHTABLE_VALUE(OBJ_TYPE, WRAPPED_OBJ); \
- --GC_REFCOUNT(WRAPPED_OBJ);
+ GC_DELREF(WRAPPED_OBJ);
#define PHP_PROTO_CE_DECLARE zend_class_entry*
#define PHP_PROTO_CE_UNREF(ce) (ce)