Review src/common/str.h#220
Merged
janrysavy merged 1 commit intocomments-translation-v2from Apr 2, 2026
Merged
Conversation
janrysavy
commented
Apr 1, 2026
| // int StrLen(const char *str); // only 2× faster, unnecessary risk of accessing unaligned memory | ||
|
|
||
| // copies the text into newly allocated memory, NULL = low memory | ||
| // copies the text into newly allocated memory, NULL = out of memory |
Owner
Author
There was a problem hiding this comment.
// nakopiruje text do nove naalokovaneho prostoru, NULL = malo pametiRationale: "low memory" is not idiomatic here; the comment describes an out-of-memory failure signaled by NULL.
janrysavy
commented
Apr 1, 2026
| // copies the text into newly allocated memory, NULL = low memory, | ||
| // additionally sets 'err' to TRUE when memory is insufficient | ||
| // copies the text into newly allocated memory, NULL = out of memory, | ||
| // also sets 'err' to TRUE on out-of-memory |
Owner
Author
There was a problem hiding this comment.
// nakopiruje text do nove naalokovaneho prostoru, NULL = malo pameti,
// navic pri nedostatku pameti nastavi 'err' na TRUERationale: The candidate is understandable but uses non-idiomatic failure wording; "out of memory" is the correct technical term in both lines.
janrysavy
commented
Apr 1, 2026
| // terminates the string with a null character that counts toward 'dstSize' | ||
| // appends the 'src' string to the end of the 'dst' string, but does not exceed 'dstSize' | ||
| // terminates the string with a null character, which counts toward 'dstSize' | ||
| // returns 'dst' |
Owner
Author
There was a problem hiding this comment.
// pripoji retezec 'src' za retezec 'dest', ale neprekroci delku 'dstSize'
// retezec zakoncuje nulou, ktera spada do delky 'dstSize'
// vraci 'dst'Rationale: The candidate incorrectly says 'dest' instead of dst, and "after the string" is less idiomatic than "to the end of".
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.
Review-generated comment translation updates for
src/common/str.h.Artifact:
artifacts/src-common-str-h-review-20260401/triple-diff-report.htmlInline review comments include the Czech source and a one-line rationale for each changed block.