New issue report by fred.reichbier:
What steps will reproduce the problem?
1. create a file testlib.h containing the following code:
typedef enum test_enumeration {
T1 = (1 << 2),
T2 = (1 << 3)
} test_enumeration;
2. run python wrap.py testlib.h in tools/wraptypes
3. check the generated testlib.py; The value T1 is wrapped as 0, T2 as 1
instead of 4 and 8.
Attachments:
pyglet_info 6.3 KB
Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #1 by fred.reichbier:
I could figure out a solution; the values used for bitshifting weren't
integers.
I attached a patch.
Attachments:
bitshift.patch 550 bytes
Comment #2 by Alex.Holkner:
Thanks, fixed in r2283. I actually applied a different patch to fix the
problem
(attached), which should also cover some similar cases.
Attachments:
bitshift2.patch 539 bytes
Issue attribute updates:
Status: Fixed
Labels: Component-Scripts
Comment #3 by fred.reichbier:
Thank you!