chore: Outline C.memcpy method#268
Merged
garyschulte merged 1 commit intobesu-eth:mainfrom Apr 28, 2025
Merged
Conversation
There was a problem hiding this comment.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
gnark/gnark-jni/gnark-eip-2537.go:1021
- [nitpick] Consider adding tests to verify that ptrAtOffset handles pointer arithmetic correctly, especially for edge cases such as offsets close to the buffer boundaries.
func ptrAtOffset(base *C.char, offset int) unsafe.Pointer {
gnark/gnark-jni/gnark-eip-2537.go:1029
- [nitpick] Consider adding tests for the copyBytes function to cover scenarios such as an empty source slice and verifying the correct placement of bytes at the desired offset.
func copyBytes(dst *C.char, offset int, src []byte) {
Contributor
57c5db9 to
218b77a
Compare
macfarla
approved these changes
Apr 28, 2025
Signed-off-by: Kevaundray Wedderburn <kevtheappdev@gmail.com>
218b77a to
1e3fb76
Compare
Merged
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.

This essentially outlines the one liner method into a CopyBytes and PtrOffset method, since it was not clear at first, what was being memcopied