Skip to content

Commit

Permalink
plperl: update ppport.h to Perl 5.34.0.
Browse files Browse the repository at this point in the history
Also apply the changes suggested by running
perl ppport.h --compat-version=5.8.0

And remove some no-longer-required NEED_foo declarations.

Dagfinn Ilmari Mannsåker

Back-patch of commit 05798c9 into all supported branches.
At the time we thought this update was mostly cosmetic, but the
lack of it has caused trouble, while the patch itself hasn't.

Discussion: https://postgr.es/m/87y278s6iq.fsf@wibble.ilmari.org
Discussion: https://postgr.es/m/20220131015130.shn6wr2fzuymerf6@alap3.anarazel.de
  • Loading branch information
tglsfdc committed Jan 31, 2022
1 parent 503c656 commit 8be956c
Show file tree
Hide file tree
Showing 3 changed files with 14,726 additions and 3,875 deletions.
10 changes: 5 additions & 5 deletions src/pl/plperl/plperl.c
Expand Up @@ -2098,8 +2098,8 @@ plperl_create_sub(plperl_proc_desc *prodesc, char *s, Oid fn_oid)
* errors properly. Perhaps it's because there's another level of eval
* inside mksafefunc?
*/
count = perl_call_pv("PostgreSQL::InServer::mkfunc",
G_SCALAR | G_EVAL | G_KEEPERR);
count = call_pv("PostgreSQL::InServer::mkfunc",
G_SCALAR | G_EVAL | G_KEEPERR);
SPAGAIN;

if (count == 1)
Expand Down Expand Up @@ -2206,7 +2206,7 @@ plperl_call_perl_func(plperl_proc_desc *desc, FunctionCallInfo fcinfo)
PUTBACK;

/* Do NOT use G_KEEPERR here */
count = perl_call_sv(desc->reference, G_SCALAR | G_EVAL);
count = call_sv(desc->reference, G_SCALAR | G_EVAL);

SPAGAIN;

Expand Down Expand Up @@ -2274,7 +2274,7 @@ plperl_call_perl_trigger_func(plperl_proc_desc *desc, FunctionCallInfo fcinfo,
PUTBACK;

/* Do NOT use G_KEEPERR here */
count = perl_call_sv(desc->reference, G_SCALAR | G_EVAL);
count = call_sv(desc->reference, G_SCALAR | G_EVAL);

SPAGAIN;

Expand Down Expand Up @@ -2337,7 +2337,7 @@ plperl_call_perl_event_trigger_func(plperl_proc_desc *desc,
PUTBACK;

/* Do NOT use G_KEEPERR here */
count = perl_call_sv(desc->reference, G_SCALAR | G_EVAL);
count = call_sv(desc->reference, G_SCALAR | G_EVAL);

SPAGAIN;

Expand Down
3 changes: 0 additions & 3 deletions src/pl/plperl/plperl.h
Expand Up @@ -86,9 +86,6 @@
#endif /* USE_REPL_SNPRINTF */

/* perl version and platform portability */
#define NEED_eval_pv
#define NEED_newRV_noinc
#define NEED_sv_2pv_flags
#include "ppport.h"

/* perl may have a different width of "bool", don't buy it */
Expand Down

0 comments on commit 8be956c

Please sign in to comment.