History

tcc.h (BufferedFile): Remove unnecessary static memory allocation

The memory needed by `buffer' will be allocated in `tcc_open_bf', these is no need to allocate them in BufferedFile statically.

Lee Duhem committed 11 years ago

Commit 20a58451 parent f1703e21 file · +1 −1Browse files

Unified · Split

tcc.h+1−1
@@ -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 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t