forked from pool/python-wxPython
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
|
From c72d78fb983bf2efe4041f5d3c86670b92e98565 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||
|
Date: Sun, 4 Oct 2020 23:02:19 +0200
|
||
|
Subject: [PATCH] Fix overflow check for wxUIntPtr type
|
||
|
|
||
|
long is 32bit on 32-bit archs and on Win64 (see
|
||
|
https://en.cppreference.com/w/cpp/language/types ). As SIP uses
|
||
|
PyLong_AsLongLong internally and uses an extra bounds check only if
|
||
|
explicitly enabled("sip.enableoverflowchecking(True)"), the overflow
|
||
|
only triggers when it also overflows `long long`, i.e. when
|
||
|
_LONG_MAX == _LLONG_MAX.
|
||
|
---
|
||
|
unittests/test_listctrl.py | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/unittests/test_listctrl.py b/unittests/test_listctrl.py
|
||
|
index c8c2d39a..0b2e3706 100644
|
||
|
--- a/unittests/test_listctrl.py
|
||
|
+++ b/unittests/test_listctrl.py
|
||
|
@@ -185,7 +185,7 @@ class listctrl_Tests(wtc.WidgetTestCase):
|
||
|
def test_listctrlItemData02(self):
|
||
|
lc = self._makeListCtrl()
|
||
|
with self.assertRaises(OverflowError):
|
||
|
- lc.SetItemData(0, wx._core._LONG_MAX + 100)
|
||
|
+ lc.SetItemData(0, wx._core._LLONG_MAX + 100)
|
||
|
|
||
|
|
||
|
def test_listctrlDeleteAllColumns(self):
|
||
|
--
|
||
|
2.28.0
|
||
|
|