summaryrefslogtreecommitdiff
path: root/xsutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'xsutils.c')
-rw-r--r--xsutils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xsutils.c b/xsutils.c
index b924c481c3..e0130d293b 100644
--- a/xsutils.c
+++ b/xsutils.c
@@ -72,6 +72,15 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs)
switch ((int)len) {
case 6:
switch (*name) {
+ case 'a':
+ if (strEQ(name, "assertion")) {
+ if (negated)
+ CvFLAGS((CV*)sv) &= ~CVf_ASSERTION;
+ else
+ CvFLAGS((CV*)sv) |= CVf_ASSERTION;
+ continue;
+ }
+ break;
case 'l':
#ifdef CVf_LVALUE
if (strEQ(name, "lvalue")) {
@@ -220,6 +229,8 @@ usage:
XPUSHs(sv_2mortal(newSVpvn("method", 6)));
if (GvUNIQUE(CvGV((CV*)sv)))
XPUSHs(sv_2mortal(newSVpvn("unique", 6)));
+ if (cvflags & CVf_ASSERTION)
+ XPUSHs(sv_2mortal(newSVpvn("assertion", 9)));
break;
case SVt_PVGV:
if (GvUNIQUE(sv))