diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2017-07-25 00:49:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-25 00:49:16 -0700 |
commit | 451d061141a14021ff95a093967827cd548720ba (patch) | |
tree | 84c032c0e1ffd34b6a8b97cc342ede6c0f257f9f /php/ext/google/protobuf/encode_decode.c | |
parent | a713b73076f1d90bdc39ea8805b50421a59d7986 (diff) | |
download | protobuf-451d061141a14021ff95a093967827cd548720ba.tar.gz protobuf-451d061141a14021ff95a093967827cd548720ba.tar.bz2 protobuf-451d061141a14021ff95a093967827cd548720ba.zip |
Fix cycle dependency for repeated field not collected by gc (#3399)
Diffstat (limited to 'php/ext/google/protobuf/encode_decode.c')
-rw-r--r-- | php/ext/google/protobuf/encode_decode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/php/ext/google/protobuf/encode_decode.c b/php/ext/google/protobuf/encode_decode.c index ef3d4cf6..4cb8997d 100644 --- a/php/ext/google/protobuf/encode_decode.c +++ b/php/ext/google/protobuf/encode_decode.c @@ -354,7 +354,7 @@ static size_t zendstringdata_handler(void* closure, const void* hd, HashTable *ht = PHP_PROTO_HASH_OF(intern->array); int index = zend_hash_num_elements(ht) - 1; - php_proto_zend_hash_index_update( + php_proto_zend_hash_index_update_mem( ht, index, memory, sizeof(zend_string*), NULL); return len; @@ -1401,7 +1401,7 @@ static void putarray(zval* array, const upb_fielddef* f, upb_sink* sink, MessageHeader *submsg = UNBOX(MessageHeader, *(zval**)memory); #else MessageHeader *submsg = - (MessageHeader*)((char*)(*(zend_object**)memory) - + (MessageHeader*)((char*)(Z_OBJ_P((zval*)memory)) - XtOffsetOf(MessageHeader, std)); #endif putrawsubmsg(submsg, f, &subsink, depth TSRMLS_CC); |