[Python-checkins] r78664 - in python/branches/py3k: Lib/test/test_re.py Modules/_sre.c
victor.stinner
python-checkins at python.org
Thu Mar 4 22:59:53 CET 2010
Author: victor.stinner
Date: Thu Mar 4 22:59:53 2010
New Revision: 78664
Log:
Issue #3299: replace PyObject_DEL() by Py_DECREF() in _sre module to fix a
crash in pydebug mode.
Modified:
python/branches/py3k/Lib/test/test_re.py
python/branches/py3k/Modules/_sre.c
Modified: python/branches/py3k/Lib/test/test_re.py
==============================================================================
--- python/branches/py3k/Lib/test/test_re.py (original)
+++ python/branches/py3k/Lib/test/test_re.py Thu Mar 4 22:59:53 2010
@@ -727,6 +727,7 @@
long_overflow = 2**128
self.assertRaises(TypeError, re.finditer, "a", {})
self.assertRaises(OverflowError, _sre.compile, "abc", 0, [long_overflow])
+ self.assertRaises(TypeError, _sre.compile, {}, 0, [])
def run_re_tests():
from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR
Modified: python/branches/py3k/Modules/_sre.c
==============================================================================
--- python/branches/py3k/Modules/_sre.c (original)
+++ python/branches/py3k/Modules/_sre.c Thu Mar 4 22:59:53 2010
@@ -2702,7 +2702,7 @@
else {
Py_ssize_t p_length;
if (!getstring(pattern, &p_length, &self->charsize)) {
- PyObject_DEL(self);
+ Py_DECREF(self);
return NULL;
}
}
More information about the Python-checkins
mailing list