Skip to content

Commit fd3ff88

Browse files
authored
Merge pull request #1937 from petterreinholdtsen/hal-module-unsigned-to-python
Made sure 'to_python(unsigned u)' only compare with LONG_MAX when needed
2 parents c8dd11e + 5115abe commit fd3ff88

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/hal/halmodule.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ PyObject *to_python(bool b) {
3939
return PyBool_FromLong(b);
4040
}
4141

42-
PyObject *to_python(unsigned u) {
43-
if(u < LONG_MAX) return PyLong_FromLong(u);
42+
PyObject *to_python(unsigned int u) {
4443
return PyLong_FromUnsignedLong(u);
4544
}
4645

0 commit comments

Comments
 (0)