Thread: pgsql: Use SvROK(sv) rather than directly checking SvTYPE(sv) == SVt_RV

pgsql: Use SvROK(sv) rather than directly checking SvTYPE(sv) == SVt_RV

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Use SvROK(sv) rather than directly checking SvTYPE(sv) == SVt_RV in plperl.
The latter is considered unwarranted chumminess with the implementation,
and can lead to crashes with recent Perl versions.

Report and fix by Tim Bunce.  Back-patch to all versions containing the
questionable coding pattern.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/pl/plperl:
        plperl.c (r1.150.2.5 -> r1.150.2.6)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plperl.c?r1=1.150.2.5&r2=1.150.2.6)