develooper Front page | perl.perl5.porters | Postings from December 2005

Re: XS-assisted SWASHGET (esp. for t/uni/class.t speedup)

Thread Previous | Thread Next
From:
SADAHIRO Tomoyuki
Date:
December 3, 2005 23:26
Subject:
Re: XS-assisted SWASHGET (esp. for t/uni/class.t speedup)
Message ID:
20051204162508.D726.BQW10602@nifty.com

On Sun, 27 Nov 2005 21:52:05 -0600, Steve Peters <steve@fisharerojo.org> wrote

> When I applied the patch locally, I got the following warnings.
> 
> > make utf8.o
> `sh  cflags "optimize='-O2'" utf8.o`  utf8.c
>           CCCMD =  cc -DPERL_CORE -c -DPERL_PATCHNUM=26219 -fno-strict-aliasing -pipe -I/usr/local/include -O2  -Wall
> utf8.c: In function `S_swash_get':
> utf8.c:1764: warning: long unsigned int format, STRLEN arg (arg 2)
> utf8.c:1800: warning: `val' might be used uninitialized in this function

Oops. To solve the problem of initialization of "val", the condition
of not using "val" should be clarified. In this case "if (!octets)"
(that is, bits == 1) does so.

However the SWASHNEW code sometimes makes bits != 1 nevertheless
bits == 1 is expected.

Then the patch attached by the name of "swash.patch.gz" fixes
SWASHNEW and its callers as well as initialization of val.

A few tests are added to t/op/pat.t:
  A perl with the old SWASHGET code (already removed) should
  fail in the test of "'A' is AsciiHexAndDash".

Change of tests about Syriac1 is just rewriting to make use ok().

Regards,
SADAHIRO Tomoyuki

Thread Previous | 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