summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-16 13:52:17 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-16 15:36:37 +0900
commit54199a3f5f77f7aacfea37d2378e82f41c6a5510 (patch)
tree5169f5f28ccf9d81af24376fe34659cd60fc20df
parent5087a6a9244066f966b1d213142258f01a4bbd13 (diff)
Use `VALUE` instead of `intptr_t`
On emscripten `intptr_t`, `uintptr_t`, `ptrdiff_t` and so on are defined as `long`, but `PRIdPTR` and so on defined as `int`.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4745
-rw-r--r--tool/mk_builtin_loader.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb
index 309ff615c7..6740ec5c17 100644
--- a/tool/mk_builtin_loader.rb
+++ b/tool/mk_builtin_loader.rb
@@ -322,7 +322,7 @@ def mk_builtin_header file
f.puts %' fprintf(f, " const VALUE *argv = GET_EP() - lnum - VM_ENV_DATA_SIZE + 1 + %ld;\\n", index);'
f.puts %' }'
end
- f.puts %' fprintf(f, " func f = (func)%"PRIdPTR"; /* == #{cfunc_name} */\\n", (intptr_t)#{cfunc_name});'
+ f.puts %' fprintf(f, " func f = (func)%"PRIuVALUE"; /* == #{cfunc_name} */\\n", (VALUE)#{cfunc_name});'
f.puts %' fprintf(f, " val = f(ec, self#{argv});\\n");'
f.puts %'}'
f.puts