]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Partial fix for bug #1306
authorChristian Heimes <christian@cheimes.de>
Fri, 30 Nov 2007 10:18:26 +0000 (10:18 +0000)
committerChristian Heimes <christian@cheimes.de>
Fri, 30 Nov 2007 10:18:26 +0000 (10:18 +0000)
commitc8967002353864e012567125d7824abaeeb31dd3
treebfeda9fe43a3dd0025ebf69708cb6442c61d0e4f
parenta22e8bdfd92cd4f1bc3d60e91df6410c4efde6a0
Partial fix for bug #1306
Multiple reinitializations of Python 3.0 failed on a system without a hardcoded default fs encoding. The patch makes sure that the default fs encoding is freed and reset to NULL on e.g. Linux.
I've also taken the liberty to increase the debugging in Objects/object.c:_Py_ForgetReference(). The method is used to validate the reference chain.
Reinitialization still fails in the 3rd round of my test suite:
* ob
object  : <refcnt 0 at 0x821c840>
type    : str
refcount: 0
address : 0x821c840
* op->_ob_prev->_ob_next
object  : <refcnt 0 at 0x821c840>
type    : str
refcount: 0
address : 0x821c840
* op->_ob_next->_ob_prev
object  : bytearray(b'')
type    : bytearray
refcount: 1
address : 0x826b838
Fatal Python error: UNREF invalid object
Include/fileobject.h
Objects/object.c
Python/bltinmodule.c
Python/pythonrun.c