small addition to STRUCT()

This commit is contained in:
timerix 2023-03-13 20:39:38 +06:00
parent 0adea8c52c
commit ce44509d04
2 changed files with 3 additions and 2 deletions

View File

@ -116,7 +116,7 @@ Maybe file_readAll(File* file, char** allBytes){
rezult=fgetc(file);
if(rezult==EOF){
if(ferror(file))
safethrow(ERR_IO,; StringBuilder_free(sb));
safethrow(ERR_IO, StringBuilder_free(sb));
break;
}
buffer[i%sizeof(buffer)]=(char)rezult;

View File

@ -8,7 +8,8 @@
ENUM_MEMBERS \
} __attribute__((__packed__)) ENUM_NAME;
#define STRUCT(STRUCT_NAME, STRUCT_MEMBERS...) typedef struct STRUCT_NAME { \
#define STRUCT(STRUCT_NAME, STRUCT_MEMBERS...) typedef struct STRUCT_NAME STRUCT_NAME; \
typedef struct STRUCT_NAME { \
STRUCT_MEMBERS \
} STRUCT_NAME; \
kt_declare(STRUCT_NAME);