develooper Front page | perl.perl5.porters | Postings from June 2008

Re: [PATCH] readable assertion names, now sv.h

Thread Next
From:
Reini Urban
Date:
June 8, 2008 06:26
Subject:
Re: [PATCH] readable assertion names, now sv.h
Message ID:
6910a60806080626kfda0dd1ja906513e8fd0aa39@mail.gmail.com
2008/6/8 Reini Urban <rurban@x-ray.at>:
> I find it rather odd to parse random temp. assertion vars. shplep, yaah, zzzz
> So I started with gv.h
> With this patch the type of failed variable is obvious without
> grepping the code.
>
> /usr/local/bin/perl5.11.0d-nt.exe -Mblib
> -MO=-qq,Bytecode,-s,-obytecode11s_5.11.0d-nt.plc bytecode11.pl
> =>
> assertion "isGV_with_GP(_gvstash)" failed: file "B.c", line 4990
> (GvSTASH failed)
> assertion "isGV_with_GP(_gvgp)" failed: file "B.c", line 4990 (GvGP failed)
> assertion "isGV_with_GP(_gvflags)" failed: file "B.c", line 5400
> (GvFLAGS failed)
>
> is more readable than
>
> assertion "isGV_with_GP(_gv)" failed: file "B.c", line 4990
> assertion "isGV_with_GP(shplep)" failed: file "B.c", line 4961
> assertion "isGV_with_GP(yaah)" failed: file "B.c", line 5400
>
> If this is a good idea and leads to no symbol clashes,
> I'll do the same for the other new assertions in sv.h and friends.
>  SvVALID  thwacke
>  SvTAIL     _svi
>  SvPAD     whap

I like the idea a lot, so I did it for sv.h as well.

-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About