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

ruby-changes:57847

From: Nobuyoshi <ko1@a...>
Date: Fri, 20 Sep 2019 23:58:47 +0900 (JST)
Subject: [ruby-changes:57847] fe1e623fae (master): Fixed format specifiers

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

From fe1e623faea75952f27baa949a7468021443c12a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 20 Sep 2019 23:25:18 +0900
Subject: Fixed format specifiers

Use PRIdPTRDIFF for the platforms where a pointer is larger than a long.

diff --git a/vm_exec.h b/vm_exec.h
index 85ab420..9c8b423 100644
--- a/vm_exec.h
+++ b/vm_exec.h
@@ -71,7 +71,7 @@ error ! https://github.com/ruby/ruby/blob/trunk/vm_exec.h#L71
 #define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
 
 #define INSN_ENTRY_SIG(insn) \
-  if (0) fprintf(stderr, "exec: %s@(%ld, %ld)@%s:%u\n", #insn, \
+  if (0) fprintf(stderr, "exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, \
                  (reg_pc - reg_cfp->iseq->body->iseq_encoded), \
                  (reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), \
                  RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), \
-- 
cgit v0.10.2


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

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