neal.norwitz
2008-08-24 22:07:29 UTC
Author: neal.norwitz
Date: Mon Aug 25 00:07:28 2008
New Revision: 66019
Log:
Merged revisions 66018 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r66018 | neal.norwitz | 2008-08-24 15:03:05 -0700 (Sun, 24 Aug 2008) | 6 lines
#3662: Fix segfault introduced when fixing memory leaks.
TESTED=./python -E -tt ./Lib/test/regrtest.py test_fileio
R (approach from bug)=Amaury and Benjamin
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_fileio.py
python/branches/py3k/Modules/_fileio.c
Modified: python/branches/py3k/Lib/test/test_fileio.py
==============================================================================
--- python/branches/py3k/Lib/test/test_fileio.py (original)
+++ python/branches/py3k/Lib/test/test_fileio.py Mon Aug 25 00:07:28 2008
@@ -226,6 +226,10 @@
except:
pass
+ def testInvalidInit(self):
+ self.assertRaises(TypeError, _fileio._FileIO, "1", 0, 0)
+
+
def test_main():
# Historically, these tests have been sloppy about removing TESTFN.
# So get rid of it no matter what.
Modified: python/branches/py3k/Modules/_fileio.c
==============================================================================
--- python/branches/py3k/Modules/_fileio.c (original)
+++ python/branches/py3k/Modules/_fileio.c Mon Aug 25 00:07:28 2008
@@ -175,7 +175,7 @@
kwlist,
Py_FileSystemDefaultEncoding,
&name, &mode, &closefd))
- goto error;
+ return -1;
}
}
Date: Mon Aug 25 00:07:28 2008
New Revision: 66019
Log:
Merged revisions 66018 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r66018 | neal.norwitz | 2008-08-24 15:03:05 -0700 (Sun, 24 Aug 2008) | 6 lines
#3662: Fix segfault introduced when fixing memory leaks.
TESTED=./python -E -tt ./Lib/test/regrtest.py test_fileio
R (approach from bug)=Amaury and Benjamin
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_fileio.py
python/branches/py3k/Modules/_fileio.c
Modified: python/branches/py3k/Lib/test/test_fileio.py
==============================================================================
--- python/branches/py3k/Lib/test/test_fileio.py (original)
+++ python/branches/py3k/Lib/test/test_fileio.py Mon Aug 25 00:07:28 2008
@@ -226,6 +226,10 @@
except:
pass
+ def testInvalidInit(self):
+ self.assertRaises(TypeError, _fileio._FileIO, "1", 0, 0)
+
+
def test_main():
# Historically, these tests have been sloppy about removing TESTFN.
# So get rid of it no matter what.
Modified: python/branches/py3k/Modules/_fileio.c
==============================================================================
--- python/branches/py3k/Modules/_fileio.c (original)
+++ python/branches/py3k/Modules/_fileio.c Mon Aug 25 00:07:28 2008
@@ -175,7 +175,7 @@
kwlist,
Py_FileSystemDefaultEncoding,
&name, &mode, &closefd))
- goto error;
+ return -1;
}
}