Skip to content

Commit 664d443

Browse files
committed
Fix Python3 compatibility bug.
1 parent c4fe369 commit 664d443

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/test_builtin_converters.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Copyright David Abrahams 2004. Distributed under the Boost
22
# Software License, Version 1.0. (See accompanying
33
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4+
import sys
5+
if (sys.version_info.major >= 3):
6+
long = int
47
r"""
58
>>> from builtin_converters_ext import *
69
@@ -74,7 +77,7 @@
7477
test unsigned long values which don't fit in a signed long.
7578
strip any 'L' characters in case the platform has > 32 bit longs
7679
77-
>>> hex(rewrap_value_unsigned_long(0x80000001L)).replace('L','')
80+
>>> hex(rewrap_value_unsigned_long(long(0x80000001))).replace('L','')
7881
'0x80000001'
7982
8083
>>> rewrap_value_long_long(42) == 42

0 commit comments

Comments
 (0)