1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

PL/Perl portability fix: avoid including XSUB.h in plperl.c.

Back-patch of commit bebe174bb4,
which see for more info.

Patch by me, with some help from Ashutosh Sharma

Discussion: https://postgr.es/m/CANFyU97OVQ3+Mzfmt3MhuUm5NwPU=-FtbNH5Eb7nZL9ua8=rcA@mail.gmail.com
This commit is contained in:
Tom Lane
2017-07-31 12:10:36 -04:00
parent d90d5a1f7a
commit 99eea89dbe
6 changed files with 210 additions and 137 deletions

View File

@ -13,6 +13,7 @@ PG_FUNCTION_INFO_V1(hstore_to_plperl);
Datum
hstore_to_plperl(PG_FUNCTION_ARGS)
{
dTHX;
HStore *in = PG_GETARG_HS(0);
int i;
int count = HS_COUNT(in);
@ -45,7 +46,8 @@ PG_FUNCTION_INFO_V1(plperl_to_hstore);
Datum
plperl_to_hstore(PG_FUNCTION_ARGS)
{
HV *hv;
dTHX;
HV *hv = (HV *) SvRV((SV *) PG_GETARG_POINTER(0));
HE *he;
int32 buflen;
int32 i;
@ -53,8 +55,6 @@ plperl_to_hstore(PG_FUNCTION_ARGS)
HStore *out;
Pairs *pairs;
hv = (HV *) SvRV((SV *) PG_GETARG_POINTER(0));
pcount = hv_iterinit(hv);
pairs = palloc(pcount * sizeof(Pairs));