Eliminate SVt_RV, and use SVt_IV to store plain references.
[p5sagit/p5-mst-13.2.git] / ext / B / t / optree_constants.t
index c39a054..c05138b 100644 (file)
@@ -43,21 +43,23 @@ sub myyes() { 1==1 }
 sub myno () { return 1!=1 }
 sub pi () { 3.14159 };
 
+my $RV_class = $] >= 5.011 ? 'IV' : 'RV';
+
 my $want = {   # expected types, how value renders in-line, todos (maybe)
     mystr      => [ 'PV', '"'.mystr.'"' ],
-    myhref     => [ 'RV', '\\\\HASH'],
+    myhref     => [ $RV_class, '\\\\HASH'],
     pi         => [ 'NV', pi ],
-    myglob     => [ 'RV', '\\\\' ],
-    mysub      => [ 'RV', '\\\\' ],
-    myunsub    => [ 'RV', '\\\\' ],
+    myglob     => [ $RV_class, '\\\\' ],
+    mysub      => [ $RV_class, '\\\\' ],
+    myunsub    => [ $RV_class, '\\\\' ],
     # these are not inlined, at least not per BC::Concise
-    #myyes     => [ 'RV', ],
-    #myno      => [ 'RV', ],
+    #myyes     => [ $RV_class, ],
+    #myno      => [ $RV_class, ],
     $] > 5.009 ? (
-    myaref     => [ 'RV', '\\\\' ],
+    myaref     => [ $RV_class, '\\\\' ],
     myfl       => [ 'NV', myfl ],
     myint      => [ 'IV', myint ],
-    myrex      => [ 'RV', '\\\\' ],
+    myrex      => [ $RV_class, '\\\\' ],
     myundef    => [ 'NULL', ],
     ) : (
     myaref     => [ 'PVIV', '' ],