Skip to content

Commit f7cb8a3

Browse files
committed
fix build with master
1 parent 621c1e9 commit f7cb8a3

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

msgpack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ PHP_MSGPACK_API int php_msgpack_unserialize(zval *return_value, char *str, size_
280280
default:
281281
MSGPACK_WARNING("[msgpack] (%s) Unknown result", __FUNCTION__);
282282
}
283-
zval_dtor(return_value);
283+
zval_ptr_dtor_nogc(return_value);
284284
msgpack_unserialize_var_destroy(&mp.user.var_hash, 1);
285285
RETVAL_FALSE;
286286
return FAILURE;

msgpack_class.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ typedef struct {
2727
} php_msgpack_unpacker_t;
2828

2929
static inline php_msgpack_base_t *msgpack_base_fetch_object(zend_object *obj) {
30-
return (php_msgpack_base_t *)((char*)(obj) - XtOffsetOf(php_msgpack_base_t, object));
30+
return (php_msgpack_base_t *)((char*)(obj) - offsetof(php_msgpack_base_t, object));
3131
}
3232
#define Z_MSGPACK_BASE_P(zv) msgpack_base_fetch_object(Z_OBJ_P((zv)))
3333

3434
static inline php_msgpack_unpacker_t *msgpack_unpacker_fetch_object(zend_object *obj) {
35-
return (php_msgpack_unpacker_t *)((char*)(obj) - XtOffsetOf(php_msgpack_unpacker_t, object));
35+
return (php_msgpack_unpacker_t *)((char*)(obj) - offsetof(php_msgpack_unpacker_t, object));
3636
}
3737
#define Z_MSGPACK_UNPACKER_P(zv) msgpack_unpacker_fetch_object(Z_OBJ_P((zv)))
3838

@@ -516,7 +516,7 @@ void msgpack_init_class() /* {{{ */ {
516516
msgpack_ce = zend_register_internal_class(&ce);
517517
msgpack_ce->create_object = php_msgpack_base_new;
518518
memcpy(&msgpack_handlers, zend_get_std_object_handlers(),sizeof msgpack_handlers);
519-
msgpack_handlers.offset = XtOffsetOf(php_msgpack_base_t, object);
519+
msgpack_handlers.offset = offsetof(php_msgpack_base_t, object);
520520
msgpack_handlers.free_obj = php_msgpack_base_free;
521521

522522
zend_declare_class_constant_long(msgpack_ce, ZEND_STRS("OPT_PHPONLY") - 1, MSGPACK_CLASS_OPT_PHPONLY);
@@ -528,7 +528,7 @@ void msgpack_init_class() /* {{{ */ {
528528
msgpack_unpacker_ce = zend_register_internal_class(&ce);
529529
msgpack_unpacker_ce->create_object = php_msgpack_unpacker_new;
530530
memcpy(&msgpack_unpacker_handlers, zend_get_std_object_handlers(),sizeof msgpack_unpacker_handlers);
531-
msgpack_unpacker_handlers.offset = XtOffsetOf(php_msgpack_unpacker_t, object);
531+
msgpack_unpacker_handlers.offset = offsetof(php_msgpack_unpacker_t, object);
532532
msgpack_unpacker_handlers.free_obj = php_msgpack_unpacker_free;
533533
msgpack_unpacker_handlers.clone_obj = NULL;
534534

msgpack_unpack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ static zend_class_entry* msgpack_unserialize_class(zval **container, zend_string
329329
}
330330
}
331331
ZEND_HASH_FOREACH_END();
332-
zval_dtor(&container_tmp);
332+
zval_ptr_dtor_nogc(&container_tmp);
333333
}
334334

335335
}

0 commit comments

Comments
 (0)