ruby-changes:4824
From: ko1@a...
Date: Thu, 8 May 2008 06:27:59 +0900 (JST)
Subject: [ruby-changes:4824] nobu - Ruby:r16318 (trunk): * thread.c (rb_thread_key_p): thread local storage stores ID.
nobu 2008-05-08 06:27:34 +0900 (Thu, 08 May 2008) New Revision: 16318 Modified files: trunk/ChangeLog trunk/string.c trunk/thread.c Log: * thread.c (rb_thread_key_p): thread local storage stores ID. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/string.c?r1=16318&r2=16317&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16318&r2=16317&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=16318&r2=16317&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 16317) +++ ChangeLog (revision 16318) @@ -1,3 +1,7 @@ +Thu May 8 06:27:33 2008 Nobuyoshi Nakada <nobu@r...> + + * thread.c (rb_thread_key_p): thread local storage stores ID. + Thu May 8 01:10:03 2008 Yukihiro Matsumoto <matz@r...> * string.c (tr_trans): should squeeze properly. [ruby-dev:34587] Index: string.c =================================================================== --- string.c (revision 16317) +++ string.c (revision 16318) @@ -4368,7 +4368,6 @@ int clen, tlen, max = RSTRING_LEN(str) * 1.2; int offset; char *buf = ALLOC_N(char, max), *t = buf; - VALUE v; while (s < send) { c0 = c = rb_enc_codepoint(s, send, enc); Index: thread.c =================================================================== --- thread.c (revision 16317) +++ thread.c (revision 16318) @@ -70,9 +70,9 @@ static volatile int system_working = 1; inline static void -st_delete_wrap(st_table * table, VALUE key) +st_delete_wrap(st_table *table, st_data_t key) { - st_delete(table, (st_data_t *) & key, 0); + st_delete(table, &key, 0); } /********************************************************************************/ @@ -1522,7 +1522,7 @@ th->local_storage = st_init_numtable(); } if (NIL_P(val)) { - st_delete(th->local_storage, (st_data_t *) & id, 0); + st_delete_wrap(th->local_storage, id); return Qnil; } st_insert(th->local_storage, id, val); @@ -1567,7 +1567,7 @@ if (!th->local_storage) { return Qfalse; } - if (st_lookup(th->local_storage, key, 0)) { + if (st_lookup(th->local_storage, id, 0)) { return Qtrue; } return Qfalse; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/