diff options
-rw-r--r-- | thread.c | 4 | ||||
-rw-r--r-- | vm_dump.c | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -321,9 +321,9 @@ rb_thread_s_debug_set(VALUE self, VALUE val) #endif #ifndef fill_thread_id_str -# define fill_thread_id_string(thid, buf) (void *)(thid) +# define fill_thread_id_string(thid, buf) ((void *)(uintptr_t)(thid)) # define fill_thread_id_str(th) (void)0 -# define thread_id_str(th) ((void *)(th)->thread_id) +# define thread_id_str(th) ((void *)(uintptr_t)(th)->thread_id) # define PRI_THREAD_ID "p" #endif @@ -1095,7 +1095,7 @@ rb_vmdebug_stack_dump_all_threads(void) ruby_fill_thread_id_string(th->thread_id, buf); fprintf(stderr, "th: %p, native_id: %s\n", th, buf); #else - fprintf(stderr, "th: %p, native_id: %p\n", (void *)th, (void *)th->thread_id); + fprintf(stderr, "th: %p, native_id: %p\n", (void *)th, (void *)(uintptr_t)th->thread_id); #endif rb_vmdebug_stack_dump_raw(th->ec, th->ec->cfp); } |