summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-13 07:37:56 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-13 07:37:56 (GMT)
commit4b318f8be941ee75d00aa86d1a61a2ebc4992215 (patch)
tree7d24875ca05a195c1b62e0e1270a311fc3949a44 /Lib
parent3023ebb43f7607584c3e123aff56e867cb04a418 (diff)
downloadcpython-4b318f8be941ee75d00aa86d1a61a2ebc4992215.zip
cpython-4b318f8be941ee75d00aa86d1a61a2ebc4992215.tar.gz
cpython-4b318f8be941ee75d00aa86d1a61a2ebc4992215.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 0d86078..1469b8b 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -327,6 +327,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,