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
This commit is contained in:
seyko
2015-05-12 21:32:32 +03:00
parent 1234beccb8
commit 06e0753fce
3 changed files with 13 additions and 20 deletions

View File

@ -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]);