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

[PATCH] readable assertion names

Thread Next
From:
Reini Urban
Date:
June 8, 2008 05:42
Subject:
[PATCH] readable assertion names
Message ID:
6910a60806080541n4f7e1939q254797411545ebea@mail.gmail.com
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
...

-- 
Reini Urban

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