diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-07 21:27:34 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-07 21:27:34 +0000 |
| commit | cfc6c3e01e7347b1fcd6fd45b1297e241a0071ed (patch) | |
| tree | e98a865d51e98d53fc82e1cb69bf2c5782f23708 /thread.c | |
| parent | 1313fbe75bacf05fdd2775d49ef514013d0d4afc (diff) | |
| download | ruby-cfc6c3e01e7347b1fcd6fd45b1297e241a0071ed.tar.gz ruby-cfc6c3e01e7347b1fcd6fd45b1297e241a0071ed.tar.xz ruby-cfc6c3e01e7347b1fcd6fd45b1297e241a0071ed.zip | |
* thread.c (rb_thread_key_p): thread local storage stores ID.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
| -rw-r--r-- | thread.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -70,9 +70,9 @@ static VALUE eTerminateSignal = INT2FIX(1); 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 @@ rb_thread_local_aset(VALUE thread, ID id, VALUE val) 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 @@ rb_thread_key_p(VALUE self, VALUE key) 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; |
