-
Notifications
You must be signed in to change notification settings - Fork 481
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
Type hinting should not accept empty values #2639
Merged
Kokan
merged 5 commits into
syslog-ng:master
from
bazsi:type-hinting-shouldnot-accept-empty-values
Mar 22, 2019
Merged
Type hinting should not accept empty values #2639
Kokan
merged 5 commits into
syslog-ng:master
from
bazsi:type-hinting-shouldnot-accept-empty-values
Mar 22, 2019
Conversation
This file contains 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
36bd006
to
1f44ec5
Compare
Build SUCCESS |
Kokan
previously approved these changes
Mar 21, 2019
@bazsi oh actually it has a conflict (probably because of astyle PR merged). Could you please rebase ? |
MrAnno
previously approved these changes
Mar 21, 2019
…t_eq For boolean values, we should use cr_assert() instead of cr_assert_eq(). Signed-off-by: Balazs Scheidler <balazs.scheidler@oneidentity.com>
We actually passed garbage to the negative tests as cr_make_param_array() didn't handle straight gchar * arrays. Signed-off-by: Balazs Scheidler <balazs.scheidler@oneidentity.com>
Empty strings are not valid numbers, so in case they are empty, we shouldn't accept them. One can still fall back to representing the value as a string. Signed-off-by: Balazs Scheidler <balazs.scheidler@oneidentity.com>
Earlier the type hinted representation of values was a bit complex, containing a shared case in a switch statement and then a lot of conditionals around the key of the switch. This one breaks that one up, as I was planning to handle the "empty-value" case here, when I found a better option of doing the same in the type hinting code. Nevertheless this version I consider easier to read, so albeit this could be improved even more, I think this is worth checking in. Signed-off-by: Balazs Scheidler <balazs.scheidler@oneidentity.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@oneidentity.com>
1f44ec5
to
8b1c172
Compare
I have rebased this to master, no other changes. Previous approves would be appreciated. |
Kokan
approved these changes
Mar 22, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
MrAnno
approved these changes
Mar 22, 2019
Build SUCCESS |
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.
This is a more comprehensive fix to #2636