Skip to content

Commit 75cc1ae

Browse files
committed
Fix handling of unsigned constants
Our code checked for a lower-case "u" in a suffix like "ull", ignoring that the suffix can be capitalized like "ULL". Signed-off-by: John Pennycook <john.pennycook@intel.com>
1 parent 2dfbdaa commit 75cc1ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codebasin/preprocessor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2002,7 +2002,7 @@ def term(self):
20022002
# Convert to decimal and then to integer with correct sign
20032003
# Preprocessor always uses 64-bit arithmetic!
20042004
int_value = int(value, base)
2005-
if suffix and "u" in suffix:
2005+
if suffix and "u" in suffix.lower():
20062006
return np.uint64(int_value)
20072007
else:
20082008
return np.int64(int_value)

0 commit comments

Comments
 (0)