1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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`.
This commit is contained in:
Nobuyoshi Nakada 2021-08-16 13:52:17 +09:00
parent 5087a6a924
commit 54199a3f5f
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2021-08-16 18:32:53 +09:00

View file

@ -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