summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-13 07:42:17 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-13 07:42:17 (GMT)
commit4c4ff5f4d43e49ee429f37916c34fff8435693ca (patch)
treed6fa43cb76d4a0a41e93793e570c5393cf47de83 /Lib
parenta6758427fd96741c6a8a1506f933bb0107d2b0a7 (diff)
parent4b318f8be941ee75d00aa86d1a61a2ebc4992215 (diff)
downloadcpython-4c4ff5f4d43e49ee429f37916c34fff8435693ca.zip
cpython-4c4ff5f4d43e49ee429f37916c34fff8435693ca.tar.gz
cpython-4c4ff5f4d43e49ee429f37916c34fff8435693ca.tar.bz2
Issue #29219: Fixed infinite recursion in the repr of uninitialized
ctypes.CDLL instances.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ctypes/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index 1c9d3a5..f870968 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -324,6 +324,10 @@ class CDLL(object):
"""
_func_flags_ = _FUNCFLAG_CDECL
_func_restype_ = c_int
+ # default values for repr
+ _name = '<uninitialized>'
+ _handle = 0
+ _FuncPtr = None
def __init__(self, name, mode=DEFAULT_MODE, handle=None,
use_errno=False,