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

Feature request: expose __config_setting_get_int #243

Open
yshui opened this issue Aug 5, 2024 · 2 comments
Open

Feature request: expose __config_setting_get_int #243

yshui opened this issue Aug 5, 2024 · 2 comments

Comments

@yshui
Copy link

yshui commented Aug 5, 2024

config_setting_get_int returns 0 when it fails to retrieve the value, but 0 is a valid value for int. This means the caller can't distinguish successful results from failure.

__config_setting_get_int does the right thing, but is not in the public API. Same applies to other similar get functions.

@hyperrealm
Copy link
Owner

config_setting_lookup_int() does what you want.

@yshui
Copy link
Author

yshui commented Sep 7, 2024

@hyperrealm it does not. it looks up a member of setting as int. __config_setting_get_int returns the value of setting itself.

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

No branches or pull requests

2 participants