diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-29 07:36:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-29 07:36:12 +0000 |
commit | 30cea657676db0ba703ae769fed4eafd5abc27fc (patch) | |
tree | 0f607ae4ea699393cb7ae9bfdf97cb600c30112c /load.c | |
parent | 95b30b0d07c40a3f7e0f0d8c74b1ae058034c8ad (diff) | |
download | ruby-30cea657676db0ba703ae769fed4eafd5abc27fc.tar.gz |
* st.c (st_update): add existing parameter to the callback function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -417,9 +417,10 @@ load_lock(const char *ftptr) } static int -release_barrier(st_data_t key, st_data_t *value, st_data_t done) +release_barrier(st_data_t key, st_data_t *value, st_data_t done, int existing) { VALUE barrier = (VALUE)*value; + if (!existing) return ST_STOP; if (done ? rb_barrier_destroy(barrier) : rb_barrier_release(barrier)) { /* still in-use */ return ST_CONTINUE; |