Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt a uniform, convenient, output gadget for the implementation functions #92

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

eyalroz
Copy link
Owner

@eyalroz eyalroz commented Jan 22, 2022

See #32.

Now using a convenient uniform gadget for the inner implementation functions.

  • Added: An output_gadget_t struct
  • Added: Named constructor idioms for output_gadget_t, instead of the function wrappers we have before: For putchar_() output, buffer output, discarding/no output, and arbitrary function output.
  • Implementation functions no longer need to maintain and pass around the parameters buffer, maxlen, idx - these are part of the uniform output gadget
  • Implementation functions no longer need to increase the position within the output (idx), nor return the increased value to their caller.
  • No longer need a dummy buffer of size 1, anywhere.

…entation for all library functions. Also, this merits a version bump.

* Added: An `output_gadget_t` struct
* Added: Named constructor idioms for `output_gadget_t`, instead of the function wrappers we have before: For `putchar_()` output, buffer output, discarding/no output, and arbitrary function output.
* Implementation functions no longer need to maintain and pass around the parameters `buffer`, `maxlen`, `idx` - these are part of the uniform output gadget
* Implementation functions no longer need to increase the position within the output (`idx)`, nor return the increased value to their caller.
* No longer need a dummy buffer of size 1, anywhere.
@eyalroz eyalroz merged commit 01e0fe5 into develop Jan 25, 2022
@eyalroz eyalroz deleted the fix-issue-32 branch January 25, 2022 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant