diff options
author | José Fonseca <jfonseca@vmware.com> | 2013-04-15 12:15:27 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2013-04-15 13:02:28 +0100 |
commit | 6a531205d131f2496468eea6a0582edb86906d1c (patch) | |
tree | 913762599c19a82693292d77582a0eab23126cfc | |
parent | 14893ffd613273e63f31f7bc787189febdb5245d (diff) |
cl: Fix Windows build.
Fixes two trivial issues:
- on Windows large integers like 0xff000001 are not `int` objects, but
rather `long` objects, so accept both types.
- and the error message caused exception
TypeError: cannot concatenate 'str' and 'long' objects
-rwxr-xr-x | generated_tests/generate-cl-int-builtins.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generated_tests/generate-cl-int-builtins.py b/generated_tests/generate-cl-int-builtins.py index 5b6eaf615..ae60ad21d 100755 --- a/generated_tests/generate-cl-int-builtins.py +++ b/generated_tests/generate-cl-int-builtins.py @@ -264,10 +264,10 @@ def getValue(type, val): getValue(type, val[3]), getValue(type, val[4])) #At this point, we should have been passed a number - if (isinstance(val, int)): + if (isinstance(val, (int, long))): return val; - print('Invalid value '+val+' encountered in getValue\n') + print('Invalid value '+repr(val)+' encountered in getValue\n') def getStrVal(type, val): return str(getValue(type,val)) |