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

Scm_CharSetAdd - do not clear 'large' flag when adding more #500

Merged
merged 1 commit into from Jul 23, 2019

Conversation

@pclouds
Copy link
Contributor

pclouds commented Jul 23, 2019

Adding more chars to a charset can't possibly make it fit the small
range. This set_large() call may clear the large flag if the input
second charset's large flag is zero, which is not wanted. This makes

(char-set-union char-set:letter+digit #[_])

return wrong when perform more algebra operations on it. Printing it out
is fine, but if you use the low level function

((with-module gauche.internal %char-set-dump)
    (char-set-union char-set:letter+digit #[_]))

then you'll see that it does not dump outside the small char range
correctly anymore. This should fix issue #497

Adding more chars to a charset can't possibly make it fit the small
range. This set_large() call may clear the large flag if the input
second charset's large flag is zero, which is not wanted. This makes

    (char-set-union char-set:letter+digit #[_])

return wrong when perform more algebra operations on it. Printing it out
is fine, but if you use the low level function

    ((with-module gauche.internal %char-set-dump)
        (char-set-union char-set:letter+digit #[_]))

then you'll see that it does not dump outside the small char range
correctly anymore. This should fix issue #497
@shirok

This comment has been minimized.

Copy link
Owner

shirok commented Jul 23, 2019

Thanks!

@shirok shirok merged commit a75f217 into shirok:master Jul 23, 2019
1 check passed
1 check passed
ci/inspecode/pr 230 issues detected.
Details
@pclouds pclouds deleted the pclouds:char-set-union-bug branch Jul 23, 2019
shirok added a commit that referenced this pull request Jul 23, 2019
#500
Confirms fix of #497
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.