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
This commit is contained in:
Nobuyoshi Nakada 2024-10-08 15:41:28 +09:00 committed by Nobuyoshi Nakada
parent d8b64eac55
commit 9a90cd2284
19 changed files with 29 additions and 25 deletions

View file

@ -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, \
}