Abusing filename[0] as type is just too much of a hack. -- From 05364072042ff37904a7b0b14cdd85a1ea1ca11d
Showing the changes to libtcc.h (1 of 4 files). Show all
Unified · Split
| @@ -49,10 +49,10 @@ LIBTCCAPI void tcc_undefine_symbol(TCCState *s, const char *sym); · 48 unmodified lines | ||
| 49 | 49 | |
| 50 | 50 | /* add a file (C file, dll, object, library, ld script). Return -1 if error. */ |
| 51 | 51 | LIBTCCAPI int tcc_add_file(TCCState *s, const char *filename, int filetype); |
| 52 | −#define TCC_FILETYPE_BINARY 1 | |
| 53 | −#define TCC_FILETYPE_C 2 | |
| 54 | −#define TCC_FILETYPE_ASM 3 | |
| 55 | −#define TCC_FILETYPE_ASM_PP 4 | |
| 52 | +#define TCC_FILETYPE_BINARY 'b' | |
| 53 | +#define TCC_FILETYPE_C 'c' | |
| 54 | +#define TCC_FILETYPE_ASM 's' | |
| 55 | +#define TCC_FILETYPE_ASM_PP 'S' | |
| 56 | 56 | |
| 57 | 57 | /* compile a string containing a C source. Return -1 if error. */ |
| 58 | 58 | LIBTCCAPI int tcc_compile_string(TCCState *s, const char *buf); |