Update upb for php. (#2662)

This commit is contained in:
Paul Yang 2017-02-06 12:40:51 -08:00 committed by GitHub
parent bd29f86804
commit 5a3405c51a
4 changed files with 2261 additions and 952 deletions

View File

@ -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);

View File

@ -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: {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff