summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-11-27 17:07:44 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-11-30 11:48:39 -0800
commitf584841efdc63848bb22f17b92a260b129df52d6 (patch)
tree0a3ad4a0024a6eb907349bcac7736a11373c5d0a /ext
parent6e074f758b8f861728ac362110fa06417f4e8b5f (diff)
downloadperl-f584841efdc63848bb22f17b92a260b129df52d6.tar.gz
Prepare B typemap for upcoming pad name changes
Diffstat (limited to 'ext')
-rw-r--r--ext/B/typemap13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/B/typemap b/ext/B/typemap
index 9bb2ed3216..045d6a0f71 100644
--- a/ext/B/typemap
+++ b/ext/B/typemap
@@ -38,6 +38,7 @@ B::RHE T_RHE_OBJ
B::PADLIST T_PL_OBJ
B::PADNAMELIST T_PNL_OBJ
+B::PADNAME T_PN_OBJ
INPUT
T_OP_OBJ
@@ -96,6 +97,14 @@ T_PNL_OBJ
else
croak(\"$var is not a reference\")
+T_PN_OBJ
+ if (SvROK($arg)) {
+ IV tmp = SvIV((SV*)SvRV($arg));
+ $var = INT2PTR($type,tmp);
+ }
+ else
+ croak(\"$var is not a reference\")
+
OUTPUT
T_MG_OBJ
sv_setiv(newSVrv($arg, "B::MAGIC"), PTR2IV($var));
@@ -113,3 +122,7 @@ T_PL_OBJ
T_PNL_OBJ
sv_setiv(newSVrv($arg, $var ? "B::PADNAMELIST" : "B::NULL"),
PTR2IV($var));
+
+T_PN_OBJ
+ sv_setiv(newSVrv($arg, $var ? "B::PADNAME" : "B::SPECIAL"),
+ PTR2IV($var));