summaryrefslogtreecommitdiff
path: root/cpan/List-Util/ListUtil.xs
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/List-Util/ListUtil.xs')
-rw-r--r--cpan/List-Util/ListUtil.xs24
1 files changed, 24 insertions, 0 deletions
diff --git a/cpan/List-Util/ListUtil.xs b/cpan/List-Util/ListUtil.xs
index 7da9b959d1..efe89ebf7a 100644
--- a/cpan/List-Util/ListUtil.xs
+++ b/cpan/List-Util/ListUtil.xs
@@ -526,6 +526,30 @@ CODE:
croak("vstrings are not implemented in this release of perl");
#endif
+void
+isstring(sv)
+ SV *sv
+PROTOTYPE: $
+CODE:
+#if PERL_VERSION > 15 || (PERL_VERSION == 15 && PERL_SUBVERSION >= 1)
+ ST(0) = boolSV(SvIsSTRING(sv));
+ XSRETURN(1);
+#else
+ croak("scalar types are not implemented in this release of perl");
+#endif
+
+void
+isnumber(sv)
+ SV *sv
+PROTOTYPE: $
+CODE:
+#if PERL_VERSION > 15 || (PERL_VERSION == 15 && PERL_SUBVERSION >= 1)
+ ST(0) = boolSV(SvIsNUMBER(sv));
+ XSRETURN(1);
+#else
+ croak("scalar types are not implemented in this release of perl");
+#endif
+
int
looks_like_number(sv)
SV *sv