summaryrefslogtreecommitdiff
path: root/builtin.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-10-08 15:41:28 +0900
committerNobuyoshi Nakada <[email protected]>2024-10-08 23:29:49 +0900
commit9a90cd228466ec088d6f0da8d1aa065f03daa7c8 (patch)
treeb4fc458cdfbdad102551c421e7469e560e2b9030 /builtin.h
parentd8b64eac55cf6c4b228b0969cd3abb0a6274de16 (diff)
Cast via `uintptr_t` function pointer between object pointer
- ISO C forbids conversion of function pointer to object pointer type - ISO C forbids conversion of object pointer to function pointer type
Diffstat (limited to 'builtin.h')
-rw-r--r--builtin.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin.h b/builtin.h
index 24aa7c2fdb..f23c0a7dad 100644
--- a/builtin.h
+++ b/builtin.h
@@ -15,7 +15,7 @@ struct rb_builtin_function {
#define RB_BUILTIN_FUNCTION(_i, _name, _fname, _arity) {\
.name = _i < 0 ? NULL : #_name, \
- .func_ptr = (void *)_fname, \
+ .func_ptr = (void *)(uintptr_t)_fname, \
.argc = _arity, \
.index = _i, \
}