From dac048f71ebbcf2f980d280711f8ff8001331c5d Mon Sep 17 00:00:00 2001 From: John Naylor Date: Sun, 4 Sep 2022 11:33:31 +0700 Subject: Build all Flex files standalone The proposed Meson build system will need a way to ignore certain generated files in order to coexist with the autoconf build system, and C files generated by Flex which are #include'd into .y files make this more difficult. In similar vein to 72b1e3a21, arrange for all Flex C files to compile to their own .o targets. Reviewed by Andres Freund Discussion: https://www.postgresql.org/message-id/20220810171935.7k5zgnjwqzalzmtm%40awork3.anarazel.de Discussion: https://www.postgresql.org/message-id/CAFBsxsF8Gc2StS3haXofshHCzqNMRXiSxvQEYGwnFsTmsdwNeg@mail.gmail.com --- contrib/cube/cube.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'contrib/cube/cube.c') diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c index a5d1ba67335..6e01800a4a8 100644 --- a/contrib/cube/cube.c +++ b/contrib/cube/cube.c @@ -119,11 +119,11 @@ cube_in(PG_FUNCTION_ARGS) { char *str = PG_GETARG_CSTRING(0); NDBOX *result; + Size scanbuflen; - cube_scanner_init(str); + cube_scanner_init(str, &scanbuflen); - if (cube_yyparse(&result) != 0) - cube_yyerror(&result, "cube parser failed"); + cube_yyparse(&result, scanbuflen); cube_scanner_finish(); -- cgit v1.2.3