Commits

Victor Stinner committed 4df33e8

Merged revisions 78664 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
r78664 | victor.stinner | 2010-03-04 22:59:53 +0100 (jeu., 04 mars 2010) | 3 lines

Issue #3299: replace PyObject_DEL() by Py_DECREF() in _sre module to fix a
crash in pydebug mode.
........

  • Participants
  • Parent commits 951fec1
  • Branches 3.1

Comments (0)

Files changed (2)

File Lib/test/test_re.py

         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

File Modules/_sre.c

 	else {
 		Py_ssize_t p_length;
 		if (!getstring(pattern, &p_length, &self->charsize)) {
-			PyObject_DEL(self);
+			Py_DECREF(self);
 			return NULL;
 		}
 	}