Commit 5a3405c5 authored by Paul Yang's avatar Paul Yang Committed by GitHub

Update upb for php. (#2662)

parent bd29f868
...@@ -209,14 +209,14 @@ static void init_generated_pool_once(TSRMLS_D) { ...@@ -209,14 +209,14 @@ static void init_generated_pool_once(TSRMLS_D) {
static void descriptor_pool_init_c_instance(DescriptorPool *pool TSRMLS_DC) { static void descriptor_pool_init_c_instance(DescriptorPool *pool TSRMLS_DC) {
zend_object_std_init(&pool->std, descriptor_pool_type TSRMLS_CC); zend_object_std_init(&pool->std, descriptor_pool_type TSRMLS_CC);
pool->symtab = upb_symtab_new(&pool->symtab); pool->symtab = upb_symtab_new();
ALLOC_HASHTABLE(pool->pending_list); ALLOC_HASHTABLE(pool->pending_list);
zend_hash_init(pool->pending_list, 1, NULL, ZVAL_PTR_DTOR, 0); zend_hash_init(pool->pending_list, 1, NULL, ZVAL_PTR_DTOR, 0);
} }
static void descriptor_pool_free_c(DescriptorPool *pool TSRMLS_DC) { static void descriptor_pool_free_c(DescriptorPool *pool TSRMLS_DC) {
upb_symtab_unref(pool->symtab, &pool->symtab); upb_symtab_free(pool->symtab);
zend_hash_destroy(pool->pending_list); zend_hash_destroy(pool->pending_list);
FREE_HASHTABLE(pool->pending_list); FREE_HASHTABLE(pool->pending_list);
......
...@@ -675,7 +675,7 @@ static void add_handlers_for_singular_field(upb_handlers *h, ...@@ -675,7 +675,7 @@ static void add_handlers_for_singular_field(upb_handlers *h,
case UPB_TYPE_INT64: case UPB_TYPE_INT64:
case UPB_TYPE_UINT64: case UPB_TYPE_UINT64:
case UPB_TYPE_DOUBLE: case UPB_TYPE_DOUBLE:
upb_shim_set(h, f, offset, -1); upb_msg_setscalarhandler(h, f, offset, -1);
break; break;
case UPB_TYPE_STRING: case UPB_TYPE_STRING:
case UPB_TYPE_BYTES: { case UPB_TYPE_BYTES: {
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment