Use ISO C syntax for flexible array members
This commit is contained in:
parent
2ea0848616
commit
5a6dea3195
3 changed files with 9 additions and 9 deletions
|
@ -2064,7 +2064,7 @@ typedef struct REExecState {
|
|||
size_t count; /* only used for RE_EXEC_STATE_GREEDY_QUANT */
|
||||
const uint8_t *cptr;
|
||||
const uint8_t *pc;
|
||||
void *buf[0];
|
||||
void *buf[];
|
||||
} REExecState;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -3231,7 +3231,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
int ref_count;
|
||||
uint64_t buf[0];
|
||||
uint64_t buf[];
|
||||
} JSSABHeader;
|
||||
|
||||
static JSClassID js_worker_class_id;
|
||||
|
|
12
quickjs.c
12
quickjs.c
|
@ -474,8 +474,8 @@ struct JSString {
|
|||
struct list_head link; /* string list */
|
||||
#endif
|
||||
union {
|
||||
uint8_t str8[0]; /* 8 bit strings will get an extra null terminator */
|
||||
uint16_t str16[0];
|
||||
__extension__ uint8_t str8[0]; /* 8 bit strings will get an extra null terminator */
|
||||
__extension__ uint16_t str16[0];
|
||||
} u;
|
||||
};
|
||||
|
||||
|
@ -664,7 +664,7 @@ typedef struct JSBoundFunction {
|
|||
JSValue func_obj;
|
||||
JSValue this_val;
|
||||
int argc;
|
||||
JSValue argv[0];
|
||||
JSValue argv[];
|
||||
} JSBoundFunction;
|
||||
|
||||
typedef enum JSIteratorKindEnum {
|
||||
|
@ -822,7 +822,7 @@ typedef struct JSJobEntry {
|
|||
JSContext *ctx;
|
||||
JSJobFunc *job_func;
|
||||
int argc;
|
||||
JSValue argv[0];
|
||||
JSValue argv[];
|
||||
} JSJobEntry;
|
||||
|
||||
typedef struct JSProperty {
|
||||
|
@ -871,7 +871,7 @@ struct JSShape {
|
|||
int deleted_prop_count;
|
||||
JSShape *shape_hash_next; /* in JSRuntime.shape_hash[h] list */
|
||||
JSObject *proto;
|
||||
JSShapeProperty prop[0]; /* prop_size elements */
|
||||
JSShapeProperty prop[]; /* prop_size elements */
|
||||
};
|
||||
|
||||
struct JSObject {
|
||||
|
@ -5015,7 +5015,7 @@ typedef struct JSCFunctionDataRecord {
|
|||
uint8_t length;
|
||||
uint8_t data_len;
|
||||
uint16_t magic;
|
||||
JSValue data[0];
|
||||
JSValue data[];
|
||||
} JSCFunctionDataRecord;
|
||||
|
||||
static void js_c_function_data_finalizer(JSRuntime *rt, JSValue val)
|
||||
|
|
Loading…
Reference in a new issue