[前][次][番号順一覧][スレッド一覧]

ruby-changes:60283

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Wed, 4 Mar 2020 12:31:15 +0900 (JST)
Subject: [ruby-changes:60283] f12b9a3338 (master): %p is for void *

https://git.ruby-lang.org/ruby.git/commit/?id=f12b9a3338

From f12b9a33382bf1f54b4f599f00fa83efa8b1a245 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Wed, 26 Feb 2020 11:45:29 +0900
Subject: %p is for void *

See also
35eb12c06397e770392a41343cbffc4b204e15c9
6f5eb285077d9abf8f97056531996c58674b570c
687308cf0dab0af675e40da2b6ab8ccd5f77c072
b6a2d63eb3dbc31e110e8cb95e054dd71d49a611

diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index e0169ed..e0e1f9e 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1489,7 +1489,7 @@ vm_ccs_push(VALUE klass, struct rb_class_cc_entries *ccs, const struct rb_callin https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1489
 void
 rb_vm_ccs_dump(struct rb_class_cc_entries *ccs)
 {
-    fprintf(stderr, "ccs:%p (%d,%d)\n", ccs, ccs->len, ccs->capa);
+    fprintf(stderr, "ccs:%p (%d,%d)\n", (void *)ccs, ccs->len, ccs->capa);
     for (int i=0; i<ccs->len; i++) {
         vm_ci_dump(ccs->entries[i].ci);
         rp(ccs->entries[i].cc);
diff --git a/vm_method.c b/vm_method.c
index 123298c..1bcec9b 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -44,12 +44,12 @@ vm_ccs_dump(VALUE klass, ID target_mid) https://github.com/ruby/ruby/blob/trunk/vm_method.c#L44
         const struct rb_class_cc_entries *ccs;
         if (target_mid) {
             if (rb_id_table_lookup(cc_tbl, target_mid, (VALUE *)&ccs)) {
-                fprintf(stderr, "  [CCTB] %p\n", cc_tbl);
+                fprintf(stderr, "  [CCTB] %p\n", (void *)cc_tbl);
                 vm_ccs_dump_i(target_mid, (VALUE)ccs, NULL);
             }
         }
         else {
-            fprintf(stderr, "  [CCTB] %p\n", cc_tbl);
+            fprintf(stderr, "  [CCTB] %p\n", (void *)cc_tbl);
             rb_id_table_foreach(cc_tbl, vm_ccs_dump_i, (void *)target_mid);
         }
     }
@@ -80,7 +80,7 @@ vm_mtbl_dump(VALUE klass, ID target_mid) https://github.com/ruby/ruby/blob/trunk/vm_method.c#L80
                 }
             }
             else {
-                fprintf(stderr, "  ## RCLASS_M_TBL (%p)\n", RCLASS_M_TBL(klass));
+                fprintf(stderr, "  ## RCLASS_M_TBL (%p)\n", (void *)RCLASS_M_TBL(klass));
                 rb_id_table_foreach(RCLASS_M_TBL(klass), vm_cme_dump_i, NULL);
             }
         }
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]