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

excessive swash init?

Thread Next
From:
Nicholas Clark
Date:
December 30, 2004 12:57
Subject:
excessive swash init?
Message ID:
20041230205730.GI77507@plum.flirble.org
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/Print.pl 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
be?

Nicholas Clark

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