summaryrefslogtreecommitdiff
path: root/xsutils.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-01-04 16:20:43 +0000
committerNicholas Clark <nick@ccl4.org>2005-01-04 16:20:43 +0000
commit42262798c481d45af93e570836f42d0cd872e008 (patch)
treef224bf72142bf6cba19224b702242ea06f891c97 /xsutils.c
parent7a4035659c7c5c03891c6a4abd384eaf4aa6753a (diff)
downloadperl-42262798c481d45af93e570836f42d0cd872e008.tar.gz
Check all attributes in modify_SV_attributes are recognised.
Fix bug where 'assertion' was always rejected as invalid. p4raw-id: //depot/perl@23744
Diffstat (limited to 'xsutils.c')
-rw-r--r--xsutils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xsutils.c b/xsutils.c
index 39bf560756..59500bc459 100644
--- a/xsutils.c
+++ b/xsutils.c
@@ -71,6 +71,15 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs)
switch (SvTYPE(sv)) {
case SVt_PVCV:
switch ((int)len) {
+ case 9:
+ if (strEQ(name, "assertion")) {
+ if (negated)
+ CvFLAGS((CV*)sv) &= ~CVf_ASSERTION;
+ else
+ CvFLAGS((CV*)sv) |= CVf_ASSERTION;
+ continue;
+ }
+ break;
case 6:
switch (*name) {
case 'a':