Skip to content

Commit 413844d

Browse files
Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597)
These types are standard C99. For compatibility with out-of-tree extensions, keep the typedefs in main/php.h.
1 parent 5e617d0 commit 413844d

36 files changed

+77
-81
lines changed

.gdbinit

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ end
482482

483483
define print_pi
484484
set $pi = (zend_property_info *)$arg0
485-
set $initial_offset = ((uint32_t)(zend_uintptr_t)(&((zend_object*)0)->properties_table[(0)]))
485+
set $initial_offset = ((uint32_t)(uintptr_t)(&((zend_object*)0)->properties_table[(0)]))
486486
set $ptr_to_val = (zval*)((char*)$pi->ce->default_properties_table + $pi->offset - $initial_offset)
487487
printf "[%p] {\n", $pi
488488
printf " offset = %p\n", $pi->offset

Zend/zend_API.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2764,7 +2764,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
27642764
internal_function->arg_info = (zend_internal_arg_info*)ptr->arg_info+1;
27652765
internal_function->num_args = ptr->num_args;
27662766
/* Currently you cannot denote that the function can accept less arguments than num_args */
2767-
if (info->required_num_args == (zend_uintptr_t)-1) {
2767+
if (info->required_num_args == (uintptr_t)-1) {
27682768
internal_function->required_num_args = ptr->num_args;
27692769
} else {
27702770
internal_function->required_num_args = info->required_num_args;

Zend/zend_API.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ typedef struct _zend_fcall_info_cache {
156156

157157
#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX2(name, return_reference, required_num_args, class_name, allow_null, is_tentative_return_type) \
158158
static const zend_internal_arg_info name[] = { \
159-
{ (const char*)(zend_uintptr_t)(required_num_args), \
159+
{ (const char*)(uintptr_t)(required_num_args), \
160160
ZEND_TYPE_INIT_CLASS_CONST(#class_name, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
161161

162162
#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, class_name, allow_null) \
@@ -170,7 +170,7 @@ typedef struct _zend_fcall_info_cache {
170170

171171
#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX2(name, return_reference, required_num_args, type, is_tentative_return_type) \
172172
static const zend_internal_arg_info name[] = { \
173-
{ (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_MASK(type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
173+
{ (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_MASK(type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
174174

175175
#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(name, return_reference, required_num_args, type) \
176176
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX2(name, return_reference, required_num_args, type, 0)
@@ -180,7 +180,7 @@ typedef struct _zend_fcall_info_cache {
180180

181181
#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX2(name, return_reference, required_num_args, class_name, type, is_tentative_return_type) \
182182
static const zend_internal_arg_info name[] = { \
183-
{ (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
183+
{ (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
184184

185185
#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(name, return_reference, required_num_args, class_name, type) \
186186
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX2(name, return_reference, required_num_args, class_name, type, 0)
@@ -190,7 +190,7 @@ typedef struct _zend_fcall_info_cache {
190190

191191
#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2(name, return_reference, required_num_args, type, allow_null, is_tentative_return_type) \
192192
static const zend_internal_arg_info name[] = { \
193-
{ (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
193+
{ (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
194194

195195
#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \
196196
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2(name, return_reference, required_num_args, type, allow_null, 0)
@@ -203,7 +203,7 @@ typedef struct _zend_fcall_info_cache {
203203

204204
#define ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args) \
205205
static const zend_internal_arg_info name[] = { \
206-
{ (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(return_reference, 0, 0)), NULL },
206+
{ (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(return_reference, 0, 0)), NULL },
207207
#define ZEND_BEGIN_ARG_INFO(name, _unused) \
208208
ZEND_BEGIN_ARG_INFO_EX(name, {}, ZEND_RETURN_VALUE, -1)
209209
#define ZEND_END_ARG_INFO() };

Zend/zend_alloc.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ static void *zend_mm_chunk_alloc(zend_mm_heap *heap, size_t size, size_t alignme
774774
#if ZEND_MM_STORAGE
775775
if (UNEXPECTED(heap->storage)) {
776776
void *ptr = heap->storage->handlers.chunk_alloc(heap->storage, size, alignment);
777-
ZEND_ASSERT(((zend_uintptr_t)((char*)ptr + (alignment-1)) & (alignment-1)) == (zend_uintptr_t)ptr);
777+
ZEND_ASSERT(((uintptr_t)((char*)ptr + (alignment-1)) & (alignment-1)) == (uintptr_t)ptr);
778778
return ptr;
779779
}
780780
#endif
@@ -2171,7 +2171,7 @@ static void zend_mm_check_leaks(zend_mm_heap *heap)
21712171
repeated = zend_mm_find_leaks_huge(heap, list);
21722172
total += 1 + repeated;
21732173
if (repeated) {
2174-
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(zend_uintptr_t)repeated);
2174+
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(uintptr_t)repeated);
21752175
}
21762176

21772177
heap->huge_list = list = list->next;
@@ -2210,7 +2210,7 @@ static void zend_mm_check_leaks(zend_mm_heap *heap)
22102210
zend_mm_find_leaks(heap, p, i + bin_pages[bin_num], &leak);
22112211
total += 1 + repeated;
22122212
if (repeated) {
2213-
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(zend_uintptr_t)repeated);
2213+
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(uintptr_t)repeated);
22142214
}
22152215
}
22162216
dbg = (zend_mm_debug_info*)((char*)dbg + bin_data_size[bin_num]);
@@ -2236,7 +2236,7 @@ static void zend_mm_check_leaks(zend_mm_heap *heap)
22362236
repeated = zend_mm_find_leaks(heap, p, i + pages_count, &leak);
22372237
total += 1 + repeated;
22382238
if (repeated) {
2239-
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(zend_uintptr_t)repeated);
2239+
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(uintptr_t)repeated);
22402240
}
22412241
i += pages_count;
22422242
}

Zend/zend_compile.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ typedef struct _zend_arg_info {
431431
* It's also used for the return type.
432432
*/
433433
typedef struct _zend_internal_function_info {
434-
zend_uintptr_t required_num_args;
434+
uintptr_t required_num_args;
435435
zend_type type;
436436
const char *default_value;
437437
} zend_internal_function_info;

Zend/zend_execute.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4804,7 +4804,7 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_array(zend_ar
48044804
}
48054805
/* }}} */
48064806

4807-
#define ZEND_FAKE_OP_ARRAY ((zend_op_array*)(zend_intptr_t)-1)
4807+
#define ZEND_FAKE_OP_ARRAY ((zend_op_array*)(intptr_t)-1)
48084808

48094809
static zend_never_inline zend_op_array* ZEND_FASTCALL zend_include_or_eval(zval *inc_filename_zv, int type) /* {{{ */
48104810
{

Zend/zend_execute_API.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string *
11411141
ALLOC_HASHTABLE(CG(unlinked_uses));
11421142
zend_hash_init(CG(unlinked_uses), 0, NULL, NULL, 0);
11431143
}
1144-
zend_hash_index_add_empty_element(CG(unlinked_uses), (zend_long)(zend_uintptr_t)ce);
1144+
zend_hash_index_add_empty_element(CG(unlinked_uses), (zend_long)(uintptr_t)ce);
11451145
return ce;
11461146
}
11471147
return NULL;

Zend/zend_hash.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t
298298
ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, bool renumber);
299299
ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, compare_func_t compar, uint32_t flag);
300300

301-
static zend_always_inline void ZEND_FASTCALL zend_hash_sort(HashTable *ht, bucket_compare_func_t compare_func, zend_bool renumber) {
301+
static zend_always_inline void ZEND_FASTCALL zend_hash_sort(HashTable *ht, bucket_compare_func_t compare_func, bool renumber) {
302302
zend_hash_sort_ex(ht, zend_sort, compare_func, renumber);
303303
}
304304

Zend/zend_inheritance.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2682,7 +2682,7 @@ static void check_unrecoverable_load_failure(zend_class_entry *ce) {
26822682
* a dependence on the inheritance hierarchy of this specific class. Instead we fall back to
26832683
* a fatal error, as would happen if we did not allow exceptions in the first place. */
26842684
if (CG(unlinked_uses)
2685-
&& zend_hash_index_del(CG(unlinked_uses), (zend_long)(zend_uintptr_t)ce) == SUCCESS) {
2685+
&& zend_hash_index_del(CG(unlinked_uses), (zend_long)(uintptr_t)ce) == SUCCESS) {
26862686
zend_exception_uncaught_error(
26872687
"During inheritance of %s with variance dependencies", ZSTR_VAL(ce->name));
26882688
}
@@ -2957,7 +2957,7 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
29572957
}
29582958

29592959
if (CG(unlinked_uses)) {
2960-
zend_hash_index_del(CG(unlinked_uses), (zend_long)(zend_uintptr_t) ce);
2960+
zend_hash_index_del(CG(unlinked_uses), (zend_long)(uintptr_t) ce);
29612961
}
29622962

29632963
orig_linking_class = CG(current_linking_class);

Zend/zend_object_handlers.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ ZEND_API zend_result zend_check_property_access(const zend_object *zobj, zend_st
536536

537537
static void zend_property_guard_dtor(zval *el) /* {{{ */ {
538538
uint32_t *ptr = (uint32_t*)Z_PTR_P(el);
539-
if (EXPECTED(!(((zend_uintptr_t)ptr) & 1))) {
539+
if (EXPECTED(!(((uintptr_t)ptr) & 1))) {
540540
efree_size(ptr, sizeof(uint32_t));
541541
}
542542
}
@@ -565,7 +565,7 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe
565565
zend_hash_init(guards, 8, NULL, zend_property_guard_dtor, 0);
566566
/* mark pointer as "special" using low bit */
567567
zend_hash_add_new_ptr(guards, str,
568-
(void*)(((zend_uintptr_t)&Z_PROPERTY_GUARD_P(zv)) | 1));
568+
(void*)(((uintptr_t)&Z_PROPERTY_GUARD_P(zv)) | 1));
569569
zval_ptr_dtor_str(zv);
570570
ZVAL_ARR(zv, guards);
571571
}
@@ -574,7 +574,7 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe
574574
ZEND_ASSERT(guards != NULL);
575575
zv = zend_hash_find(guards, member);
576576
if (zv != NULL) {
577-
return (uint32_t*)(((zend_uintptr_t)Z_PTR_P(zv)) & ~1);
577+
return (uint32_t*)(((uintptr_t)Z_PTR_P(zv)) & ~1);
578578
}
579579
} else {
580580
ZEND_ASSERT(Z_TYPE_P(zv) == IS_UNDEF);

Zend/zend_objects_API.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525

2626
#define OBJ_BUCKET_INVALID (1<<0)
2727

28-
#define IS_OBJ_VALID(o) (!(((zend_uintptr_t)(o)) & OBJ_BUCKET_INVALID))
28+
#define IS_OBJ_VALID(o) (!(((uintptr_t)(o)) & OBJ_BUCKET_INVALID))
2929

30-
#define SET_OBJ_INVALID(o) ((zend_object*)((((zend_uintptr_t)(o)) | OBJ_BUCKET_INVALID)))
30+
#define SET_OBJ_INVALID(o) ((zend_object*)((((uintptr_t)(o)) | OBJ_BUCKET_INVALID)))
3131

32-
#define GET_OBJ_BUCKET_NUMBER(o) (((zend_intptr_t)(o)) >> 1)
32+
#define GET_OBJ_BUCKET_NUMBER(o) (((intptr_t)(o)) >> 1)
3333

3434
#define SET_OBJ_BUCKET_NUMBER(o, n) do { \
35-
(o) = (zend_object*)((((zend_uintptr_t)(n)) << 1) | OBJ_BUCKET_INVALID); \
35+
(o) = (zend_object*)((((uintptr_t)(n)) << 1) | OBJ_BUCKET_INVALID); \
3636
} while (0)
3737

3838
#define ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST(h) do { \

Zend/zend_portability.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ extern "C++" {
701701
# define ZEND_SET_ALIGNED(alignment, decl) decl
702702
#endif
703703

704-
#define ZEND_SLIDE_TO_ALIGNED(alignment, ptr) (((zend_uintptr_t)(ptr) + ((alignment)-1)) & ~((alignment)-1))
704+
#define ZEND_SLIDE_TO_ALIGNED(alignment, ptr) (((uintptr_t)(ptr) + ((alignment)-1)) & ~((alignment)-1))
705705
#define ZEND_SLIDE_TO_ALIGNED16(ptr) ZEND_SLIDE_TO_ALIGNED(Z_UL(16), ptr)
706706

707707
#ifdef ZEND_WIN32

Zend/zend_types.h

-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
# define ZEND_ENDIAN_LOHI_C_4(a, b, c, d) a, b, c, d
4848
#endif
4949

50-
typedef bool zend_bool;
5150
typedef unsigned char zend_uchar;
5251

5352
typedef enum {
@@ -71,9 +70,6 @@ typedef ZEND_RESULT_CODE zend_result;
7170
# endif
7271
#endif
7372

74-
typedef intptr_t zend_intptr_t;
75-
typedef uintptr_t zend_uintptr_t;
76-
7773
#ifdef ZTS
7874
#define ZEND_TLS static TSRM_TLS
7975
#define ZEND_EXT_TLS TSRM_TLS

Zend/zend_vm_execute.h

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/zend_vm_execute.skl

+5-5
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static void init_opcode_serialiser(void)
102102
Z_TYPE_INFO(tmp) = IS_LONG;
103103
for (i = 0; i < zend_handlers_count; i++) {
104104
Z_LVAL(tmp) = i;
105-
zend_hash_index_add(zend_handlers_table, (zend_long)(zend_uintptr_t)zend_opcode_handlers[i], &tmp);
105+
zend_hash_index_add(zend_handlers_table, (zend_long)(uintptr_t)zend_opcode_handlers[i], &tmp);
106106
}
107107
}
108108

@@ -113,14 +113,14 @@ ZEND_API void ZEND_FASTCALL zend_serialize_opcode_handler(zend_op *op)
113113
if (!zend_handlers_table) {
114114
init_opcode_serialiser();
115115
}
116-
zv = zend_hash_index_find(zend_handlers_table, (zend_long)(zend_uintptr_t)op->handler);
116+
zv = zend_hash_index_find(zend_handlers_table, (zend_long)(uintptr_t)op->handler);
117117
ZEND_ASSERT(zv != NULL);
118-
op->handler = (const void *)(zend_uintptr_t)Z_LVAL_P(zv);
118+
op->handler = (const void *)(uintptr_t)Z_LVAL_P(zv);
119119
}
120120

121121
ZEND_API void ZEND_FASTCALL zend_deserialize_opcode_handler(zend_op *op)
122122
{
123-
op->handler = zend_opcode_handlers[(zend_uintptr_t)op->handler];
123+
op->handler = zend_opcode_handlers[(uintptr_t)op->handler];
124124
}
125125

126126
ZEND_API const void* ZEND_FASTCALL zend_get_opcode_handler_func(const zend_op *op)
@@ -133,7 +133,7 @@ ZEND_API const void* ZEND_FASTCALL zend_get_opcode_handler_func(const zend_op *o
133133
if (!zend_handlers_table) {
134134
init_opcode_serialiser();
135135
}
136-
zv = zend_hash_index_find(zend_handlers_table, (zend_long)(zend_uintptr_t)op->handler);
136+
zv = zend_hash_index_find(zend_handlers_table, (zend_long)(uintptr_t)op->handler);
137137
ZEND_ASSERT(zv != NULL);
138138
return zend_opcode_handler_funcs[Z_LVAL_P(zv)];
139139
#else

docs/parameter-parsing-api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ on input and is used to verify the PHP parameter is an instance of that class.
6767
```txt
6868
a - array (zval*)
6969
A - array or object (zval*)
70-
b - boolean (zend_bool)
70+
b - boolean (bool)
7171
C - class (zend_class_entry*)
7272
d - double (double)
7373
f - function or array containing php method call info (returned as
@@ -97,9 +97,9 @@ The following characters also have a meaning in the specifier string:
9797
* `!` - the parameter it follows can be of specified type or NULL. If NULL is
9898
passed, and the output for such type is a pointer, then the output pointer is
9999
set to a native NULL pointer. For 'b', 'l' and 'd', an extra argument of type
100-
zend_bool* must be passed after the corresponding bool*, zend_long* or
100+
bool* must be passed after the corresponding bool*, zend_long* or
101101
double* arguments, respectively. A non-zero value will be written to the
102-
zend_bool if a PHP NULL is passed.
102+
bool if a PHP NULL is passed.
103103
For `f` use the ``ZEND_FCI_INITIALIZED(fci)`` macro to check if a callable
104104
has been provided and ``!ZEND_FCI_INITIALIZED(fci)`` to check if a PHP NULL
105105
is passed.

ext/date/php_date.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,7 @@ static void date_interval_object_to_hash(php_interval_obj *intervalobj, HashTabl
21452145

21462146
/* Records whether this is a special relative interval that needs to be recreated from a string */
21472147
if (intervalobj->from_string) {
2148-
ZVAL_BOOL(&zv, (zend_bool)intervalobj->from_string);
2148+
ZVAL_BOOL(&zv, (bool)intervalobj->from_string);
21492149
zend_hash_str_update(props, "from_string", strlen("from_string"), &zv);
21502150
ZVAL_STR_COPY(&zv, intervalobj->date_string);
21512151
zend_hash_str_update(props, "date_string", strlen("date_string"), &zv);
@@ -2171,7 +2171,7 @@ static void date_interval_object_to_hash(php_interval_obj *intervalobj, HashTabl
21712171
ZVAL_FALSE(&zv);
21722172
zend_hash_str_update(props, "days", sizeof("days")-1, &zv);
21732173
}
2174-
ZVAL_BOOL(&zv, (zend_bool)intervalobj->from_string);
2174+
ZVAL_BOOL(&zv, (bool)intervalobj->from_string);
21752175
zend_hash_str_update(props, "from_string", strlen("from_string"), &zv);
21762176

21772177
#undef PHP_DATE_INTERVAL_ADD_PROPERTY

ext/opcache/ZendAccelerator.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1507,11 +1507,11 @@ static zend_persistent_script *store_script_in_file_cache(zend_persistent_script
15071507
#if defined(__AVX__) || defined(__SSE2__)
15081508
/* Align to 64-byte boundary */
15091509
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 64);
1510-
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 63L) & ~63L);
1510+
ZCG(mem) = (void*)(((uintptr_t)ZCG(mem) + 63L) & ~63L);
15111511
#elif ZEND_MM_NEED_EIGHT_BYTE_REALIGNMENT
15121512
/* Align to 8-byte boundary */
15131513
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 8);
1514-
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 7L) & ~7L);
1514+
ZCG(mem) = (void*)(((uintptr_t)ZCG(mem) + 7L) & ~7L);
15151515
#else
15161516
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used);
15171517
#endif
@@ -2410,7 +2410,7 @@ static zend_class_entry* zend_accel_inheritance_cache_add(zend_class_entry *ce,
24102410

24112411
#if ZEND_MM_NEED_EIGHT_BYTE_REALIGNMENT
24122412
/* Align to 8-byte boundary */
2413-
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 7L) & ~7L);
2413+
ZCG(mem) = (void*)(((uintptr_t)ZCG(mem) + 7L) & ~7L);
24142414
#endif
24152415

24162416
memset(ZCG(mem), 0, size);

ext/opcache/jit/zend_jit_disasm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static const char* zend_jit_disasm_resolver(
262262
((void)ud);
263263
# endif
264264
const char *name;
265-
void *a = (void*)(zend_uintptr_t)(addr);
265+
void *a = (void*)(uintptr_t)(addr);
266266
Dl_info info;
267267

268268
name = zend_jit_disasm_find_symbol(addr, offset);

ext/opcache/jit/zend_jit_oprofile.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static void zend_jit_oprofile_register(const char *name,
2727
size_t size)
2828
{
2929
if (op_agent) {
30-
op_write_native_code(op_agent, name, (uint64_t)(zend_uintptr_t)start, start, size);
30+
op_write_native_code(op_agent, name, (uint64_t)(uintptr_t)start, start, size);
3131
}
3232
}
3333

ext/opcache/jit/zend_jit_trace.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static zend_always_inline const char *zend_jit_trace_star_desc(uint8_t trace_fla
4646
}
4747
}
4848

49-
static int zend_jit_trace_startup(zend_bool reattached)
49+
static int zend_jit_trace_startup(bool reattached)
5050
{
5151
if (!reattached) {
5252
zend_jit_traces = (zend_jit_trace_info*)zend_shared_alloc(sizeof(zend_jit_trace_info) * JIT_G(max_root_traces));

0 commit comments

Comments
 (0)