diff options
author | Salvador FandiƱo <sfandino@yahoo.com> | 2002-11-30 17:24:09 +0000 |
---|---|---|
committer | hv <hv@crypt.org> | 2003-02-16 13:55:10 +0000 |
commit | 06492da604676b8820ba5623ac813ceec4f48731 (patch) | |
tree | 51a6bda59973daccf9c0377e9639e90650598088 /xsutils.c | |
parent | ed25273444c5542e4865fbe422e026b78ba33b80 (diff) | |
download | perl-06492da604676b8820ba5623ac813ceec4f48731.tar.gz |
add support for assertions. Updated form of:
Subject: Re: Did the assertion patch/feature submission get overlooked?
Message-ID: <3DE8F439.50402@yahoo.com>
p4raw-id: //depot/perl@18727
Diffstat (limited to 'xsutils.c')
-rw-r--r-- | xsutils.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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)) |