Skip to content

Commit d31fffe

Browse files
committed
few more except zend_inheritance_cache_entry since the count info is not stored in the same layout (not needed)
1 parent 5ebb06e commit d31fffe

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

Zend/Optimizer/zend_call_graph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct _zend_call_info {
3939
bool named_args; /* Function has named arguments */
4040
bool is_prototype; /* An overridden child method may be called */
4141
int num_args; /* Number of arguments, excluding named and variadic arguments */
42-
zend_send_arg_info arg_info[1];
42+
zend_send_arg_info arg_info[1] ZEND_ELEMENT_COUNT(num_args);
4343
};
4444

4545
struct _zend_func_info {

Zend/zend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ typedef struct _zend_trait_method_reference {
9595
typedef struct _zend_trait_precedence {
9696
zend_trait_method_reference trait_method;
9797
uint32_t num_excludes;
98-
zend_string *exclude_class_names[1];
98+
zend_string *exclude_class_names[1] ZEND_ELEMENT_COUNT(num_excludes);
9999
} zend_trait_precedence;
100100

101101
typedef struct _zend_trait_alias {

Zend/zend_ast.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ typedef struct _zend_ast_list {
191191
zend_ast_attr attr;
192192
uint32_t lineno;
193193
uint32_t children;
194-
zend_ast *child[1];
194+
zend_ast *child[1] ZEND_ELEMENT_COUNT(children);
195195
} zend_ast_list;
196196

197197
/* Lineno is stored in val.u2.lineno */

Zend/zend_attributes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ typedef struct _zend_attribute {
5858
/* Parameter offsets start at 1, everything else uses 0. */
5959
uint32_t offset;
6060
uint32_t argc;
61-
zend_attribute_arg args[1];
61+
zend_attribute_arg args[1] ZEND_ELEMENT_COUNT(argc);
6262
} zend_attribute;
6363

6464
typedef struct _zend_internal_attribute {

Zend/zend_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ struct _zend_resource {
572572
typedef struct {
573573
size_t num;
574574
size_t num_allocated;
575-
struct _zend_property_info *ptr[1];
575+
struct _zend_property_info *ptr[1] ZEND_ELEMENT_COUNT(num);
576576
} zend_property_info_list;
577577

578578
typedef union {

ext/ffi/ffi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ typedef struct _zend_ffi_callback_data {
912912
ffi_cif cif;
913913
uint32_t arg_count;
914914
ffi_type *ret_type;
915-
ffi_type *arg_types[0];
915+
ffi_type *arg_types[0] ZEND_COUNT_ELEMENT(arg_count);
916916
} zend_ffi_callback_data;
917917

918918
static void zend_ffi_callback_hash_dtor(zval *zv) /* {{{ */

ext/fileinfo/libmagic/cdf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ typedef struct {
277277

278278
typedef struct {
279279
size_t cat_num;
280-
cdf_catalog_entry_t cat_e[1];
280+
cdf_catalog_entry_t cat_e[1] ZEND_ELEMENT_COUNT(cat_num);
281281
} cdf_catalog_t;
282282

283283
struct timespec;

ext/opcache/jit/zend_jit_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ struct _zend_jit_trace_stack_frame {
538538
int used_stack;
539539
int old_checked_stack;
540540
int old_peek_checked_stack;
541-
zend_jit_trace_stack stack[1];
541+
zend_jit_trace_stack stack[1] ZEND_ELEMENT_COUNT(used_stack);
542542
};
543543

544544
#define TRACE_FRAME_SHIFT_NUM_ARGS 16

ext/opcache/jit/zend_jit_ir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
typedef struct _ir_refs {
143143
uint32_t count;
144144
uint32_t limit;
145-
ir_ref refs[0];
145+
ir_ref refs[0] ZEND_ELEMENT_COUNT(count);
146146
} ir_refs;
147147

148148
#define ir_refs_size(_n) (offsetof(ir_refs, refs) + sizeof(ir_ref) * (_n))

0 commit comments

Comments
 (0)