Trent Nelson
ab02db23b1
Silence compiler warnings on Solaris 10 via explicit (void *) casts.
(Compiler: Solaris Studio 12.3)
14 years ago
Christian Heimes
e81dc296f2
Fixed memory leak in error branch of object_repr which may leak a reference to mod when type_name returns NULL. CID 715371
14 years ago
Christian Heimes
47770ed914
Fixed memory leak in error branch of object_repr which may leak a reference to mod when type_name returns NULL. CID 715371
14 years ago
Christian Heimes
a0e7e41cba
Fixed possible reference leak to mod when type_name() returns NULL
14 years ago
Christian Heimes
4e80eea60e
Fixed possible reference leak to mod when type_name() returns NULL
14 years ago
Antoine Pitrou
58098a77e6
Issue #13992 : The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.
Because of this change, a couple extension modules compiled for 2.7.4
(those which use the trashcan mechanism, despite it being undocumented)
will not be loadable by 2.7.3 and earlier. However, extension modules
compiled for 2.7.3 and earlier will be loadable by 2.7.4.
14 years ago
Antoine Pitrou
56cd62c04a
Issue #13992 : The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.
Because of this change, a couple extension modules compiled for 3.2.4
(those which use the trashcan mechanism, despite it being undocumented)
will not be loadable by 3.2.3 and earlier. However, extension modules
compiled for 3.2.3 and earlier will be loadable by 3.2.4.
14 years ago
Antoine Pitrou
6f430e4963
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
c5bef75c77
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
99cc629969
Issue #15142 : Fix reference leak when deallocating instances of types created using PyType_FromSpec().
14 years ago
Antoine Pitrou
a1433fed8e
Remove tab characters
14 years ago
Antoine Pitrou
682d94c11a
Use size_t, not ssize_t (issue #14801 ).
14 years ago
Benjamin Peterson
f1ae5cf5c7
fix possible refleak ( closes #14752 )
14 years ago
Benjamin Peterson
89a6e9a27b
fix possible refleak ( closes #14752 )
14 years ago
Benjamin Peterson
7b1668735a
don't use a slot wrapper from a different special method ( closes #14658 )
This also alters the fix to #11603 . Specifically, setting __repr__ to
object.__str__ now raises a recursion RuntimeError when str() or repr() is
called instead of silently bypassing the recursion. I believe this behavior is
more correct.
14 years ago
Benjamin Peterson
d157a4c3dd
don't use a slot wrapper from a different special method ( closes #14658 )
This also alters the fix to #11603 . Specifically, setting __repr__ to
object.__str__ now raises a recursion RuntimeError when str() or repr() is
called instead of silently bypassing the recursion. I believe this behavior is
more correct.
14 years ago
Benjamin Peterson
b6af60c2a9
adjust formatting
14 years ago
Benjamin Peterson
3471bb67e7
remove extraneous condition
14 years ago
Benjamin Peterson
ab3c1c1994
be consistent with rest of function
14 years ago
Benjamin Peterson
6e7832b04c
check to make sure the attribute is a string ( #14334 )
14 years ago
Benjamin Peterson
16d84ac355
check to make sure the attribute is a string ( #14334 )
14 years ago
Benjamin Peterson
52c424343d
allow cycles throught the __dict__ slot to be cleared ( closes #1469629 )
Patch from Armin, test from me.
14 years ago
Benjamin Peterson
2652d2570e
ready types returned from PyType_FromSpec
14 years ago
Benjamin Peterson
e28108cbd7
adjust declaration
14 years ago
Benjamin Peterson
a8d458560e
allow cycles throught the __dict__ slot to be cleared ( closes #1469629 )
Patch from Armin, test from me.
14 years ago
Antoine Pitrou
5b4b2da55d
Fix the fix for issue #12149 : it was incorrect, although it had the side
effect of appearing to resolve the issue. Thanks to Mark Shannon for
noticing.
14 years ago
Antoine Pitrou
2e872082f6
Fix the fix for issue #12149 : it was incorrect, although it had the side
effect of appearing to resolve the issue. Thanks to Mark Shannon for
noticing.
14 years ago
Eli Bendersky
d784185303
Issue #13161 : fix doc strings of __i*__ operators
14 years ago
Benjamin Peterson
de66ecc75f
fix possible refleaks
15 years ago
Eli Bendersky
d3baae73be
Issue #13161 : fix doc strings of __i*__ operators
14 years ago
Nick Coghlan
de31b191e5
Issue 1294232: Fix errors in metaclass calculation affecting some cases of metaclass inheritance. Patch by Daniel Urban.
15 years ago
Benjamin Peterson
ae13c88d8d
fix possible refleaks
15 years ago
Antoine Pitrou
8cdc40e3b0
Issue #11603 : Fix a crash when __str__ is rebound as __repr__.
Patch by Andreas Stührk.
15 years ago
Antoine Pitrou
84f1b1718d
Issue #12149 : Update the method cache after a type's dictionnary gets
cleared by the garbage collector. This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase).
Diagnosis and patch by Davide Rizzo.
15 years ago
Antoine Pitrou
304f0f952d
Issue #11603 : Fix a crash when __str__ is rebound as __repr__.
Patch by Andreas Stührk.
15 years ago
Antoine Pitrou
1616645a00
Issue #12149 : Update the method cache after a type's dictionnary gets
cleared by the garbage collector. This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase).
Diagnosis and patch by Davide Rizzo.
15 years ago
Benjamin Peterson
80a09c70bf
use '->' to indicate return values
15 years ago
Benjamin Peterson
fbe56bb8bd
use '->' to indicate return values
15 years ago
Ezio Melotti
c2077b0d9b
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
15 years ago
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
15 years ago
Martin v. Löwis
7be5b78b4f
Merged revisions 88456 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88456 | martin.v.loewis | 2011-02-21 17:24:00 +0100 (Mo, 21 Feb 2011) | 2 lines
- Check for NULL result in PyType_FromSpec.
........
15 years ago
Georg Brandl
032400b2d8
#11249 : in PyType_FromSpec, copy tp_doc slot since it usually will point to a static string literal which should not be deallocated together with the type.
15 years ago
Martin v. Löwis
738236dbd6
Issue #11067 : Add PyType_GetFlags, to support PyUnicode_Check
in the limited ABI
15 years ago
Benjamin Peterson
32a8fe8b56
Merged revisions 88069 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88069 | benjamin.peterson | 2011-01-17 13:54:55 -0600 (Mon, 17 Jan 2011) | 1 line
remove unneeded assertion
........
15 years ago
Benjamin Peterson
fba33478a5
Merged revisions 88069 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88069 | benjamin.peterson | 2011-01-17 13:54:55 -0600 (Mon, 17 Jan 2011) | 1 line
remove unneeded assertion
........
15 years ago
Benjamin Peterson
37b9e46a04
remove unneeded assertion
15 years ago
Benjamin Peterson
cd8500193f
Merged revisions 88066 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88066 | benjamin.peterson | 2011-01-17 13:44:46 -0600 (Mon, 17 Jan 2011) | 1 line
correct assertion
........
15 years ago
Benjamin Peterson
d82f45b720
Merged revisions 88066 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88066 | benjamin.peterson | 2011-01-17 13:44:46 -0600 (Mon, 17 Jan 2011) | 1 line
correct assertion
........
15 years ago
Benjamin Peterson
0dd5ca0882
correct assertion
15 years ago
Benjamin Peterson
acd17591f5
Merged revisions 88063 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88063 | benjamin.peterson | 2011-01-17 13:24:34 -0600 (Mon, 17 Jan 2011) | 4 lines
turn some checks into assertions, since they are implied by the caller
Reviewed by Georg.
........
15 years ago