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

Expose default help printer function #1425

Merged
merged 2 commits into from
Jul 4, 2022
Merged

Conversation

yurikhan
Copy link
Contributor

@yurikhan yurikhan commented Jul 3, 2022

Improves #1329.

@google-cla
Copy link

google-cla bot commented Jul 3, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Comment on lines 295 to 296
void (*HelperPrinterf)() = NULL);
void (*HelperPrinterf)(FILE*,
const char*) = NULL);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change to the API. If needed, I think we can overload Initialize to accept either an argumentless function or a two-argument version. Please say so if this is necessary.

@LebedevRI
Copy link
Collaborator

Hmm yeah, the current implementation is indeed not what i would expect either :/
I think the proper solution would be to expose the internal::DefaultHelperPrintf(), and let the user call it when needed.

@yurikhan yurikhan changed the title Pass the default help string into custom help printer Expose default help printer function Jul 3, 2022
@yurikhan
Copy link
Contributor Author

yurikhan commented Jul 3, 2022

@LebedevRI You mean like this?

@LebedevRI
Copy link
Collaborator

@LebedevRI You mean like this?

Yep!

@yurikhan
Copy link
Contributor Author

yurikhan commented Jul 3, 2022

Not sure what the sanitizer checks are trying to tell me.

@dmah42
Copy link
Member

dmah42 commented Jul 4, 2022

the sanitizer builds are currently broken. i haven't had a chance to look into it.

@dmah42 dmah42 merged commit 4136c4a into google:main Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants