X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xsutils.c;h=9844b0e398658082467245f1849abfaf3a5b5a57;hb=32babee08ee923133079392c9eae66cc543e1115;hp=b924c481c398b4d2850b30340cd32999bfd252ee;hpb=13c1b20720b7eeca2a0c896ac27f004bc376edb3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/xsutils.c b/xsutils.c index b924c48..9844b0e 100644 --- a/xsutils.c +++ b/xsutils.c @@ -1,6 +1,7 @@ /* xsutils.c * - * Copyright (c) 1999-2002, Larry Wall + * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, + * by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -72,6 +73,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")) { @@ -99,15 +109,6 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs) continue; } break; - case 'u': - if (strEQ(name, "unique")) { - if (negated) - GvUNIQUE_off(CvGV((CV*)sv)); - else - GvUNIQUE_on(CvGV((CV*)sv)); - continue; - } - break; } break; } @@ -220,6 +221,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))