X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Ftypes%2Fcpp_exp.c;h=89a8f0ebb21007cdde4c3c4534d25f3655ecd030;hb=35060621f2fd5079502543d17942127c1a602f72;hp=2df4854b47e4dfa8c598c48c2d137713577266d4;hpb=2fa436074ca9a5e87f39b696de832fa2188fcfc6;p=m6w6%2Fext-psi diff --git a/src/types/cpp_exp.c b/src/types/cpp_exp.c index 2df4854..89a8f0e 100644 --- a/src/types/cpp_exp.c +++ b/src/types/cpp_exp.c @@ -32,7 +32,7 @@ struct psi_cpp_exp *psi_cpp_exp_init(token_t type, void *data) { - struct psi_cpp_exp *exp = calloc(1, sizeof(*exp)); + struct psi_cpp_exp *exp = pecalloc(1, sizeof(*exp), 1); switch ((exp->type = type)) { case PSI_T_WARNING: @@ -73,10 +73,6 @@ void psi_cpp_exp_free(struct psi_cpp_exp **exp_ptr) switch (exp->type) { case PSI_T_WARNING: case PSI_T_ERROR: - if (!exp->data.tok) { - break; - } - /* no break */ case PSI_T_UNDEF: case PSI_T_IFDEF: case PSI_T_IFNDEF: @@ -188,6 +184,8 @@ void psi_cpp_exp_exec(struct psi_cpp_exp *exp, struct psi_cpp *cpp, struct psi_d exp->token->text->val, cpp->level, cpp->skip); #if PSI_CPP_DEBUG + fflush(stderr); + dprintf(2, "PSI: CPP exec -> "); psi_cpp_exp_dump(2, exp); #endif