Open
Conversation
Add comment to clarify that DateTime->Value is not seconds since the epoch. Add comments clarifying confusing details in the DateTime structure. Add comment to explain what the qpf_grow_fn_t() type is, used by qprintf.
Greptile SummaryThis PR adds clarifying comments to two header files without altering any logic — exactly as described. The changes improve developer understanding of the Key changes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| centrallix-lib/include/datatypes.h | Adds inline comments to all DateTime bitfield members and the Value field; comments are accurate per codebase evidence (Year is 1900-based, Month/Day/Hour/Minute/Second are 0-based, Value is not a Unix timestamp). |
| centrallix-lib/include/qprintf.h | Adds named parameters to the qpf_grow_fn_t function-pointer typedef and a Javadoc-style comment block; parameter names and descriptions match actual implementations (e.g., htr_internal_GrowFn, qpfPrintf_grow). |
Sequence Diagram
sequenceDiagram
participant Caller
participant qpfPrintf_va_internal
participant qpf_grow_fn_t
Caller->>qpfPrintf_va_internal: qpfPrintf_va_internal(s, &str, &size, grow_fn, grow_arg, format, ap)
loop For each format specifier
qpfPrintf_va_internal->>qpfPrintf_va_internal: Check if buffer is large enough
alt Buffer too small
qpfPrintf_va_internal->>qpf_grow_fn_t: grow_fn(&str, &size, offset, args, req)
qpf_grow_fn_t-->>qpfPrintf_va_internal: 1 (success) / 0 (failure)
end
qpfPrintf_va_internal->>qpfPrintf_va_internal: Write formatted output to str
end
qpfPrintf_va_internal-->>Caller: bytes written (or -1 on error)
Last reviewed commit: f19429f
Contributor
Author
|
@greptileai Please re-review this PR and let me know if you have any other comments, or let me know if the PR is ready to merge. |
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.
Changes extracted from #85. Should not affect logic. Review should be very easy.