fix: Ruby 3.4 compatibility for function pointer types#76
Open
cardmagic wants to merge 1 commit intoSciRuby:masterfrom
Open
fix: Ruby 3.4 compatibility for function pointer types#76cardmagic wants to merge 1 commit intoSciRuby:masterfrom
cardmagic wants to merge 1 commit intoSciRuby:masterfrom
Conversation
Ruby 3.4 enforces stricter type checking for function pointers passed to rb_define_method and rb_define_module_function. Changes: - Fix argc values to match function signatures - Fix parameter order for variadic functions (int argc, VALUE *argv, VALUE self) - Fix VALUE *argv[] typos (double pointer -> single pointer) - Remove unused parameters from rng max/min/size functions - Update rb_rescue callback to take 2 arguments - Fix CLASS_OF() calls to pass VALUE instead of C struct pointer - Use GSL 2.8 API (gsl_bspline_ncontrol) - Remove duplicate gsl_matrix_complex_conjugate (now in GSL 2.8+) - Add explicit VALUE cast for RARRAY_LEN with void* params Tested with Ruby 3.4.8, GSL 2.8 on macOS arm64. Full test suite: 755 tests, 1,514,054 assertions, 0 failures. Fixes SciRuby#75
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes compilation errors on Ruby 3.4 caused by stricter function pointer type checking.
VALUE *argv[]→VALUE *argv)gsl_bspline_ncontrol)gsl_matrix_complex_conjugate(now in GSL 2.8+)Test Plan
Fixes #75