Merged
Conversation
Member
Member
Author
Member
Author
|
Maybe this would be better than checking the API version? #if !defined(HAVE_RB_EXT_RESOLVE_SYMBOL)
#elif !defined(RUBY_UNTYPED_DATA_WARNING)
# error RUBY_UNTYPED_DATA_WARNING is not defined
#elif RUBY_UNTYPED_DATA_WARNING
/* rb_ext_resolve_symbol() has been defined since Ruby 3.3, but digest
* bundled with 3.3 didn't use it. */
# define DIGEST_USE_RB_EXT_RESOLVE_SYMBOL 1
#endif |
knu
approved these changes
Jun 7, 2024
casperisfine
reviewed
Jun 7, 2024
ext/digest/digest.c
Outdated
| @@ -537,6 +537,36 @@ rb_digest_class_init(VALUE self) | |||
| * Data_Wrap_Struct(0, 0, 0, (void *)&sha1)); | |||
There was a problem hiding this comment.
Would be good to update the documentation too?
Member
Author
There was a problem hiding this comment.
Yes.
This should have been updated when rb_digest_make_metadata was added.
knu
approved these changes
Jun 8, 2024
Merged
byroot
added a commit
to byroot/keccak.rb
that referenced
this pull request
Dec 29, 2024
q9f
pushed a commit
to q9f/keccak.rb
that referenced
this pull request
Dec 29, 2024
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.
Recently Ruby 3.4 warns use of "untyped data" classes.
This PR makes digest to use
rb_ext_resolve_symbolthat is provided since Ruby 3.3, in 3.4 or later.Note that the function is not used with 3.3, for the binary compatibility's sake, since the digest bundled with 3.3 does not use it.