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

Shouldn't you use | for XORing flags and not &? #13

Open
Keithcat1 opened this issue Mar 8, 2022 · 3 comments
Open

Shouldn't you use | for XORing flags and not &? #13

Keithcat1 opened this issue Mar 8, 2022 · 3 comments

Comments

@Keithcat1
Copy link

I was under the impression that & is used to check the presence of a flag while | is used to toggle a flag.
For example bass4py/bass/stream.pyx:line 89

@Timtam
Copy link
Owner

Timtam commented Mar 8, 2022

Yeah, you're right, that's how its supposed to be. I however don't find a line like that in stream.pyx:89. Mind pulling the latest version and giving me the probably errorneous line afterwards or just telling me its content so that I can verify thats actually wrong? I literally reworked that new Cython version over 3 times during the last 7 years so there are alot of errors which I didn't catch or introduced myself by reworking it so many times. That might be one of them.

@Keithcat1
Copy link
Author

That's because I was being a potato and giving the wrong filename by accident.

bass4py/bass/syncs.pyx:line 89

      type = type & _BASS_SYNC_ONETIME

@Timtam
Copy link
Owner

Timtam commented Mar 8, 2022

yep, that seems to be an error for sure. I'll have to develop the trait to always write tests whenever I implement a new functionality, 'cause that would have been catched exactly by tests I guess. Its hard to break with habits though.

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