1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From 9e999e464615a3b36051ffaa0424bdb6f5599934 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 16 Jul 2026 11:14:47 +0200
Subject: [PATCH] Fix build with PHP 8.6.0alpha2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
. The XtOffsetOf() alias of C’s offsetof() macro has been removed. Use
offsetof() directly.
---
php_judy.c | 2 +-
php_judy.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/php_judy.c b/php_judy.c
index a7387e7..01886ab 100644
--- a/php_judy.c
+++ b/php_judy.c
@@ -1138,7 +1138,7 @@ PHP_MINIT_FUNCTION(judy)
judy_handlers.has_dimension = judy_object_has_dimension;
judy_handlers.dtor_obj = zend_objects_destroy_object;
judy_handlers.free_obj = judy_object_free_storage;
- judy_handlers.offset = XtOffsetOf(judy_object, std);
+ judy_handlers.offset = offsetof(judy_object, std);
/* implements some interface to provide access to judy object as an array */
zend_class_implements(judy_ce, 4, zend_ce_arrayaccess, zend_ce_countable, zend_ce_iterator, php_json_serializable_ce);
diff --git a/php_judy.h b/php_judy.h
index 6239c23..55b53e5 100644
--- a/php_judy.h
+++ b/php_judy.h
@@ -215,7 +215,7 @@ typedef struct _judy_object {
} judy_object;
static inline judy_object *php_judy_object(zend_object *obj) {
- return (judy_object *)((char*)(obj) - XtOffsetOf(judy_object, std));
+ return (judy_object *)((char*)(obj) - offsetof(judy_object, std));
}
static inline int judy_pack_short_string_internal(const char *str, size_t len, Word_t *index)
|