diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-07-29 10:42:47 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-07-29 10:42:47 -0400 |
commit | aa4982169d42660a848e4d25f52bdabcf3f12860 (patch) | |
tree | 21e018b4fa0cd315bff3fe00de9bf813e1d15a87 /contrib/cube/cube.c | |
parent | 3ba763bd95b6eb027bc87e73806241b460807091 (diff) | |
download | postgresql-aa4982169d42660a848e4d25f52bdabcf3f12860.tar.gz postgresql-aa4982169d42660a848e4d25f52bdabcf3f12860.zip |
Fix contrib/cube and contrib/seg to build with bison 3.0.
These modules used the YYPARSE_PARAM macro, which has been deprecated
by the bison folk since 1.875, and which they finally removed in 3.0.
Adjust the code to use the replacement facility, %parse-param, which
is a much better solution anyway since it allows specification of the
type of the extra parser parameter. We can thus get rid of a lot of
unsightly casting.
Back-patch to all active branches, since somebody might try to build
a back branch with up-to-date tools.
Diffstat (limited to 'contrib/cube/cube.c')
-rw-r--r-- | contrib/cube/cube.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c index 4a207ccb988..2d3f5bc8e33 100644 --- a/contrib/cube/cube.c +++ b/contrib/cube/cube.c @@ -27,8 +27,8 @@ PG_MODULE_MAGIC; #define ARRPTR(x) ( (double *) ARR_DATA_PTR(x) ) #define ARRNELEMS(x) ArrayGetNItems( ARR_NDIM(x), ARR_DIMS(x)) -extern int cube_yyparse(); -extern void cube_yyerror(const char *message); +extern int cube_yyparse(NDBOX **result); +extern void cube_yyerror(NDBOX **result, const char *message); extern void cube_scanner_init(const char *str); extern void cube_scanner_finish(void); @@ -159,12 +159,12 @@ Datum cube_in(PG_FUNCTION_ARGS) { char *str = PG_GETARG_CSTRING(0); - void *result; + NDBOX *result; cube_scanner_init(str); if (cube_yyparse(&result) != 0) - cube_yyerror("bogus input"); + cube_yyerror(&result, "bogus input"); cube_scanner_finish(); |