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

excessive swash init?

Thread Next
Nicholas Clark
December 30, 2004 12:57
excessive swash init?
Message ID:
While investigating bug 33185 I had a watchpoint on PL_bostr, and I saw
something that surprised me. It seems that the data lines from
lib/unicore/lib/gc_sc/ were getting processed multiple times.

It seems that S_reginclass calls Perl_regclass_swash like this:

	    SV *sw = regclass_swash(n, TRUE, 0, (SV**)&av);

where that TRUE is for doinit, and in turn Perl_regclass_swatch is repeatedly
calling swash_init here:

 	    if (a)
		sw = *a;
	    else if (si && doinit) {
		sw = swash_init("utf8", "", si, 1, 0);
		(void)av_store(av, 1, sw);

Is there excessive repeated initialisation going on? Or is all as it should

Nicholas Clark

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About