Add weakref support to sockets and re pattern objects.

This commit is contained in:
Raymond Hettinger 2004-05-31 03:09:25 +00:00
parent cb87bc8e7e
commit 027bb633b6
7 changed files with 69 additions and 5 deletions

View file

@ -147,7 +147,8 @@ class _socketobject(object):
__doc__ = _realsocket.__doc__
__slots__ = ["_sock", "send", "recv", "sendto", "recvfrom"]
__slots__ = ["_sock", "send", "recv", "sendto", "recvfrom",
"__weakref__"]
def __init__(self, family=AF_INET, type=SOCK_STREAM, proto=0, _sock=None):
if _sock is None: