Fix function pointer type mismatch with rb_define_private_method
rb_define_private_method performs strict type checking on the function
pointer. As a result, we cannot pass the function a generic signature.
/github/workspace/src/namespace.c:1097:72: note: expected 'VALUE (*)(void)' {aka 'long unsigned int (*)(void)'} but argument is of type 'VALUE (*)(int, VALUE *, VALUE)' {aka 'long unsigned int (*)(int, long unsigned int *, long unsigned int)'}
1097 | namespace_define_loader_method(VALUE module, const char *name, VALUE (*func)(ANYARGS), int argc)
| ~~~~~~~~^~~~~~~~~~~~~~
This commit defines the method directly to avoid the mismatch error.
Fix function pointer type mismatch with
rb_define_private_methodrb_define_private_methodperforms strict type checking on the functionpointer. As a result, we cannot pass the function a generic signature.
This commit defines the method directly to avoid the mismatch error.