History

libtcc: cleanup -x<filetype> switch code

Abusing filename[0] as type is just too much of a hack. -- From 05364072042ff37904a7b0b14cdd85a1ea1ca11d

grischka committed 10 years ago

Commit 09a487e1 parent e6301134 files · +34 −39Browse files

Showing the changes to libtcc.h (1 of 4 files). Show all

Unified · Split

libtcc.h+4−4
@@ -49,10 +49,10 @@ LIBTCCAPI void tcc_undefine_symbol(TCCState *s, const char *sym); · 48 unmodified lines
4949
5050 /* add a file (C file, dll, object, library, ld script). Return -1 if error. */
5151 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'
5656
5757 /* compile a string containing a C source. Return -1 if error. */
5858 LIBTCCAPI int tcc_compile_string(TCCState *s, const char *buf);

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