summaryrefslogtreecommitdiff
path: root/ext/B/B.xs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/B/B.xs')
-rw-r--r--ext/B/B.xs29
1 files changed, 28 insertions, 1 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs
index e6af7a1531..aa02d540c8 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -25,8 +25,10 @@ static const char* const svclassnames[] = {
"B::BIND",
#endif
"B::IV",
- "B::RV",
"B::NV",
+#if PERL_VERSION <= 10
+ "B::RV",
+#endif
"B::PV",
"B::PVIV",
"B::PVNV",
@@ -34,6 +36,9 @@ static const char* const svclassnames[] = {
#if PERL_VERSION <= 8
"B::BM",
#endif
+#if PERL_VERSION >= 11
+ "B::ORANGE",
+#endif
#if PERL_VERSION >= 9
"B::GV",
#endif
@@ -1366,6 +1371,24 @@ packiv(sv)
ST(0) = sv_2mortal(newSVpvn((char *)&w, 4));
}
+
+#if PERL_VERSION >= 11
+
+B::SV
+RV(sv)
+ B::IV sv
+ CODE:
+ if( SvROK(sv) ) {
+ RETVAL = SvRV(sv);
+ }
+ else {
+ croak( "argument is not SvROK" );
+ }
+ OUTPUT:
+ RETVAL
+
+#endif
+
MODULE = B PACKAGE = B::NV PREFIX = Sv
NV
@@ -1392,12 +1415,16 @@ U32
PARENT_FAKELEX_FLAGS(sv)
B::NV sv
+#if PERL_VERSION < 11
+
MODULE = B PACKAGE = B::RV PREFIX = Sv
B::SV
SvRV(sv)
B::RV sv
+#endif
+
MODULE = B PACKAGE = B::PV PREFIX = Sv
char*