The memory needed by `buffer' will be allocated in `tcc_open_bf', these is no need to allocate them in BufferedFile statically.
Unified · Split
| @@ -494,7 +494,7 @@ typedef struct BufferedFile { · 493 unmodified lines | |||
| 494 | int ifndef_macro_saved; /* saved ifndef_macro */ | 494 | int ifndef_macro_saved; /* saved ifndef_macro */ |
| 495 | int *ifdef_stack_ptr; /* ifdef_stack value at the start of the file */ | 495 | int *ifdef_stack_ptr; /* ifdef_stack value at the start of the file */ |
| 496 | char filename[1024]; /* filename */ | 496 | char filename[1024]; /* filename */ |
| 497 | unsigned char buffer[IO_BUF_SIZE + 1]; /* extra size for CH_EOB char */ | 497 | unsigned char buffer[1]; /* extra size for CH_EOB char */ |
| 498 | } BufferedFile; | 498 | } BufferedFile; |
| 499 | 499 | ||
| 500 | #define CH_EOB '\\' /* end of buffer or '\0' char in file */ | 500 | #define CH_EOB '\\' /* end of buffer or '\0' char in file */ |