diff options
author | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-27 06:24:37 +0000 |
---|---|---|
committer | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-27 06:24:37 +0000 |
commit | 23178d10444f256af67c15deb4a5e16811135723 (patch) | |
tree | b081e77b978ab58226f3d2419702ece2d427bfd7 | |
parent | da65a3d9067a25628a8e033c1a4c800f671acdbc (diff) | |
download | ruby-23178d10444f256af67c15deb4a5e16811135723.tar.gz |
* gc.c (gc_page_sweep): Fix compile warning from last commit.
* hash.c (hash_aset_str): Re-use existing variable to avoid
unnecessary pointer dereferencing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gc.c | 2 | ||||
-rw-r--r-- | hash.c | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Wed Nov 27 15:21:17 2013 Aman Gupta <ruby@tmm1.net> + + * gc.c (gc_page_sweep): Fix compile warning from last commit. + * hash.c (hash_aset_str): Re-use existing variable to avoid + unnecessary pointer dereferencing. + Wed Nov 27 15:12:55 2013 Koichi Sasada <ko1@atdot.net> * gc.c (gc_page_sweep): disable debug print. @@ -2745,7 +2745,7 @@ gc_page_sweep(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_ if (0) fprintf(stderr, "gc_page_sweep(%d): freed?: %d, limt: %d, freed_slots: %d, empty_slots: %d, final_slots: %d\n", (int)rb_gc_count(), final_slots + freed_slots + empty_slots == sweep_page->limit, - (int)sweep_page->limit, (int)freed_slots, (int)empty_slots, final_slots); + (int)sweep_page->limit, (int)freed_slots, (int)empty_slots, (int)final_slots); if (heap_pages_deferred_final && !finalizing) { rb_thread_t *th = GET_THREAD(); @@ -1264,7 +1264,7 @@ hash_aset_str(st_data_t *key, st_data_t *val, struct update_arg *arg, int existi if (!existing) { VALUE str = (VALUE)*key; if (!OBJ_FROZEN(str)) - *key = rb_fstring((VALUE)*key); + *key = rb_fstring(str); } return hash_aset(key, val, arg, existing); } |