diff options
Diffstat (limited to 'php/ext')
-rw-r--r-- | php/ext/google/protobuf/def.c | 2 | ||||
-rw-r--r-- | php/ext/google/protobuf/message.c | 4 | ||||
-rw-r--r-- | php/ext/google/protobuf/package.xml | 38 | ||||
-rw-r--r-- | php/ext/google/protobuf/protobuf.h | 2 | ||||
-rw-r--r-- | php/ext/google/protobuf/type_check.c | 1 |
5 files changed, 43 insertions, 4 deletions
diff --git a/php/ext/google/protobuf/def.c b/php/ext/google/protobuf/def.c index 13f7cdd6..8140fe47 100644 --- a/php/ext/google/protobuf/def.c +++ b/php/ext/google/protobuf/def.c @@ -249,9 +249,11 @@ PHP_METHOD(Descriptor, getField) { MAKE_STD_ZVAL(field_hashtable_value); ZVAL_OBJ(field_hashtable_value, field_descriptor_type->create_object( field_descriptor_type TSRMLS_CC)); + Z_DELREF_P(field_hashtable_value); #else field_hashtable_value = field_descriptor_type->create_object(field_descriptor_type TSRMLS_CC); + --GC_REFCOUNT(field_hashtable_value); #endif FieldDescriptor *field_php = UNBOX_HASHTABLE_VALUE(FieldDescriptor, field_hashtable_value); diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c index 6db010c5..b14c1f0c 100644 --- a/php/ext/google/protobuf/message.c +++ b/php/ext/google/protobuf/message.c @@ -379,6 +379,7 @@ PHP_METHOD(Message, whichOneof) { PHP_PROTO_FAKE_SCOPE_BEGIN(LOWER_CLASS##_type); \ zval* value = message_get_property_internal(getThis(), &member TSRMLS_CC); \ PHP_PROTO_FAKE_SCOPE_END; \ + zval_dtor(&member); \ PHP_PROTO_RETVAL_ZVAL(value); \ } \ PHP_METHOD(UPPER_CLASS, set##UPPER_FIELD) { \ @@ -390,6 +391,7 @@ PHP_METHOD(Message, whichOneof) { zval member; \ PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 1); \ message_set_property_internal(getThis(), &member, value TSRMLS_CC); \ + zval_dtor(&member); \ PHP_PROTO_RETVAL_ZVAL(getThis()); \ } @@ -402,6 +404,7 @@ PHP_METHOD(Message, whichOneof) { message_get_oneof_property_internal(getThis(), &member, \ return_value TSRMLS_CC); \ PHP_PROTO_FAKE_SCOPE_END; \ + zval_dtor(&member); \ } \ PHP_METHOD(UPPER_CLASS, set##UPPER_FIELD) { \ zval* value = NULL; \ @@ -412,6 +415,7 @@ PHP_METHOD(Message, whichOneof) { zval member; \ PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 1); \ message_set_property_internal(getThis(), &member, value TSRMLS_CC); \ + zval_dtor(&member); \ PHP_PROTO_RETVAL_ZVAL(getThis()); \ } diff --git a/php/ext/google/protobuf/package.xml b/php/ext/google/protobuf/package.xml index 53aa4c7f..626eb46b 100644 --- a/php/ext/google/protobuf/package.xml +++ b/php/ext/google/protobuf/package.xml @@ -10,11 +10,11 @@ <email>protobuf-opensource@google.com</email> <active>yes</active> </lead> - <date>2017-11-15</date> + <date>2017-12-11</date> <time>11:02:07</time> <version> - <release>3.5.0</release> - <api>3.5.0</api> + <release>3.5.1</release> + <api>3.5.1</api> </version> <stability> <release>stable</release> @@ -184,5 +184,37 @@ GA release. GA release. </notes> </release> + <release> + <version> + <release>3.5.0.1</release> + <api>3.5.0.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2017-12-06</date> + <time>11:02:07</time> + <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> + <notes> +GA release. + </notes> + </release> + <release> + <version> + <release>3.5.1</release> + <api>3.5.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2017-12-11</date> + <time>11:02:07</time> + <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> + <notes> +GA release. + </notes> + </release> </changelog> </package> diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index bd475144..f299b415 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.5.0" +#define PHP_PROTOBUF_VERSION "3.5.1" #define MAX_LENGTH_OF_INT64 20 #define SIZEOF_INT64 8 diff --git a/php/ext/google/protobuf/type_check.c b/php/ext/google/protobuf/type_check.c index 37171426..85f5051e 100644 --- a/php/ext/google/protobuf/type_check.c +++ b/php/ext/google/protobuf/type_check.c @@ -532,6 +532,7 @@ void check_map_field(const zend_class_entry* klass, PHP_PROTO_LONG key_type, map_field_handlers->write_dimension( CACHED_TO_ZVAL_PTR(map_field), &key, CACHED_PTR_TO_ZVAL_PTR((CACHED_VALUE*)value) TSRMLS_CC); + zval_dtor(&key); } RETURN_ZVAL(CACHED_TO_ZVAL_PTR(map_field), 1, 1); |