From 4274c44de7dfb99a1058a5af515e9865cc9d2ff9 Mon Sep 17 00:00:00 2001 From: grischka Date: Wed, 18 Apr 2012 18:32:37 +0200 Subject: tcc.c: fix previous commit "Use CString to concat linker options" - remove redunant else branch - zero-terminate linker_arg - declare cstr_xxx as PUB_FUNC (which are functions used in tcc.c but not in the libtcc API. Useful for a tcc(.exe) that uses the libtcc.(so/dll)) - while at it, export PUB_FUNCs from dll --- tcc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index cc59912..00fc4bb 100644 --- a/tcc.h +++ b/tcc.h @@ -51,6 +51,7 @@ #define inp next_inp #ifdef LIBTCC_AS_DLL # define LIBTCCAPI __declspec(dllexport) +# define PUB_FUNC LIBTCCAPI #endif #endif @@ -989,12 +990,11 @@ PUB_FUNC void tcc_error(const char *fmt, ...); PUB_FUNC void tcc_warning(const char *fmt, ...); /* other utilities */ -ST_INLN void cstr_ccat(CString *cstr, int ch); -ST_FUNC void cstr_cat(CString *cstr, const char *str); -ST_FUNC void cstr_wccat(CString *cstr, int ch); -ST_FUNC void cstr_new(CString *cstr); -ST_FUNC void cstr_free(CString *cstr); -ST_FUNC void add_char(CString *cstr, int c); +PUB_FUNC void cstr_ccat(CString *cstr, int ch); +PUB_FUNC void cstr_cat(CString *cstr, const char *str); +PUB_FUNC void cstr_wccat(CString *cstr, int ch); +PUB_FUNC void cstr_new(CString *cstr); +PUB_FUNC void cstr_free(CString *cstr); #define cstr_reset(cstr) cstr_free(cstr) ST_FUNC Section *new_section(TCCState *s1, const char *name, int sh_type, int sh_flags); -- cgit v1.3.1