ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
Re: blurg - more wrongly shared things (was Re: [perl #41124] Unicode tr/// Fails Inside of ithreads)
by SADAHIRO Tomoyuki other posts by this author
Dec 31 2006 5:55AM messages near this date
Re: blurg - more wrongly shared things (was Re: [perl #41124] Unicode tr/// Fails Inside of ithreads) | Re: blurg - more wrongly shared things (was Re: [perl #41124] Unicode tr/// Fails Inside of ithreads)
On Sat, 30 Dec 2006 22:11:09 +0900, SADAHIRO Tomoyuki wrote
 
>  The swash for tr/// is created by calling swash_init() from pmtrans()
>  in op.c at the compile time.
>  The swash for m// and s/// is created by calling swash_init() from
>  regclass_swash() in regexec.c at the run time and seems to bound
>  with PL_regex_pad, instead of opcode.
>  The swash for uc() etc. is created by calling swash_init() from
>  to_utf8_case() in utf8.c and stored in PL_utf8_toupper etc.
>  
>  Then should the swash for tr/// be stored somewhere but cSVOP->op_sv?

For cache of swashes, a new variable PL_trans_padav is added.
Here is a patch attached: wtrans_padav.patch.gz

P.S.
I'm not sure why storing the address of swash into op_sv:
 [say, cSVOPo-> op_sv = newSViv(PTR2IV(swash)); and fetch it
  by INT2PTR(SV*, SvIV((SV*)cSVOP-> op_sv)) ] won't do trick
  under threads.

Hence the index for PL_trans_padav is stored into op_sv
and each do_trans_<something> _utf8 needs av_fetch().

Regards,
SADAHIRO Tomoyuki
Thread:
Imacat @ Mail . Imacat . Idv . Tw
SADAHIRO Tomoyuki
Nicholas Clark
SADAHIRO Tomoyuki
SADAHIRO Tomoyuki
Nicholas Clark
Dave Mitchell
Nicholas Clark
Dave Mitchell
Jerry D. Hedden
SADAHIRO Tomoyuki

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved