diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-08-05 14:44:11 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-08-05 14:44:11 -0500 |
commit | 5a4d63bd5f5f484ca406b6cf7f6c8d0fb9326a0a (patch) | |
tree | 3dcd4551179367768e61315ce1166cf8675fd382 /XS.xs | |
parent | a829b7a6273ae1d8c7e4c45587bf47d76c066fed (diff) | |
download | package-stash-xs-5a4d63bd5f5f484ca406b6cf7f6c8d0fb9326a0a.tar.gz package-stash-xs-5a4d63bd5f5f484ca406b6cf7f6c8d0fb9326a0a.zip |
don't allow assigning globs as scalars
Diffstat (limited to 'XS.xs')
-rw-r--r-- | XS.xs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -241,7 +241,11 @@ static int _valid_for_type(SV *value, vartype_t type) switch (type) { case VAR_SCALAR: - return SVT_SCALAR(sv_type); + /* XXX is a glob a scalar? assigning a glob to the scalar slot seems + * to work here, but in pure perl i'm pretty sure it goes to the EGV + * slot, which seems more correct to me. just disable it for now + * i guess */ + return SVT_SCALAR(sv_type) && sv_type != SVt_PVGV; case VAR_ARRAY: return SVT_ARRAY(sv_type); case VAR_HASH: |