summaryrefslogtreecommitdiffstats
path: root/XS.xs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-01-05 13:05:28 -0600
committerJesse Luehrs <doy@tozt.net>2011-01-05 13:17:29 -0600
commit32107d99dbb23f635a2c1665eedf250d7ecad852 (patch)
treef8496668feff6ff6e5ae07ee830fc550ad5eb0e9 /XS.xs
parentd512020f7edd20384d1e7f9cce7c87fc31f18363 (diff)
downloadpackage-stash-xs-32107d99dbb23f635a2c1665eedf250d7ecad852.tar.gz
package-stash-xs-32107d99dbb23f635a2c1665eedf250d7ecad852.zip
use correct scalar test (reported by Roland van Ipenburg)0.18
Diffstat (limited to 'XS.xs')
-rw-r--r--XS.xs6
1 files changed, 1 insertions, 5 deletions
diff --git a/XS.xs b/XS.xs
index 5957b1a..a32ca45 100644
--- a/XS.xs
+++ b/XS.xs
@@ -213,11 +213,7 @@ int _valid_for_type(SV *value, vartype_t type)
switch (type) {
case VAR_SCALAR:
- return sv_type == SVt_NULL ||
- sv_type == SVt_IV ||
- sv_type == SVt_NV ||
- sv_type == SVt_PV ||
- sv_type == SVt_RV;
+ return SvROK(value) ? SvOK(SvRV(value)) : SvOK(value);
case VAR_ARRAY:
return sv_type == SVt_PVAV;
case VAR_HASH: