From 06e0753fce99d4b845c054ce343f49149522ff2c Mon Sep 17 00:00:00 2001 From: seyko Date: Tue, 12 May 2015 21:32:32 +0300 Subject: minor pp optimizations * remove free_defines() from tcc_preprocess() all cleanup will be done in tcc_delete * move a preprocessor file closing to tcc_delete too --- libtcc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libtcc.c') diff --git a/libtcc.c b/libtcc.c index d21beb4..1266baf 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1217,6 +1217,10 @@ LIBTCCAPI void tcc_delete(TCCState *s1) tcc_cleanup(); + /* close a preprocessor output */ + if (s1->ppfp && s1->ppfp != stdout) + fclose(s1->ppfp); + /* free all sections */ for(i = 1; i < s1->nb_sections; i++) free_section(s1->sections[i]); -- cgit v1.3.1