interned strings++
[m6w6/ext-psi] / src / types / cpp_exp.c
index 2df4854b47e4dfa8c598c48c2d137713577266d4..89a8f0ebb21007cdde4c3c4534d25f3655ecd030 100644 (file)
@@ -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