X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser.re;h=a313ac91a7e73ae0ec397c164b91dd1c49d66f13;hp=59c8bdaf141d12136b62afe2b794d884166fb2e9;hb=b1d875d13e5a8f7600d3df6b44c75e8613cfe509;hpb=ba906e039ffe9e57842ce5135aa43efa00b8a4c6 diff --git a/src/parser.re b/src/parser.re index 59c8bda..a313ac9 100644 --- a/src/parser.re +++ b/src/parser.re @@ -181,10 +181,10 @@ static void psi_parser_register_constants(struct psi_parser *P) } #endif -struct psi_plist *psi_parser_preprocess(struct psi_parser *P, struct psi_plist *tokens) +struct psi_plist *psi_parser_preprocess(struct psi_parser *P, struct psi_plist **tokens) { - if (psi_cpp_process(P->preproc, &tokens)) { - return tokens; + if (psi_cpp_process(P->preproc, tokens)) { + return *tokens; } return NULL; } @@ -206,7 +206,7 @@ bool psi_parser_parse(struct psi_parser *P, struct psi_parser_input *I) return false; } - if (!(preproc = psi_parser_preprocess(P, scanned))) { + if (!(preproc = psi_parser_preprocess(P, &scanned))) { psi_plist_free(scanned); return false; }