summaryrefslogtreecommitdiff
path: root/cffi/backend_ctypes.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2012-08-09 11:34:48 +0200
committerArmin Rigo <arigo@tunes.org>2012-08-09 11:34:48 +0200
commitb257b7fcca2f5a103092d8fd15f4d46aa22925aa (patch)
treef261558992a7e91765639dc912783d3cdaf59e59 /cffi/backend_ctypes.py
parente06a9fa669dc076206caabcb3d58e9d07e7d2662 (diff)
downloadcffi-b257b7fcca2f5a103092d8fd15f4d46aa22925aa.tar.gz
Finally found out the "right" way to implement ffi.gc(), in just a
few lines of Python code using weakrefs with callbacks.
Diffstat (limited to 'cffi/backend_ctypes.py')
-rw-r--r--cffi/backend_ctypes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cffi/backend_ctypes.py b/cffi/backend_ctypes.py
index 21d09c0..b1aa893 100644
--- a/cffi/backend_ctypes.py
+++ b/cffi/backend_ctypes.py
@@ -2,7 +2,7 @@ import ctypes, ctypes.util, operator, sys
from . import model
class CTypesData(object):
- __slots__ = []
+ __slots__ = ['__weakref__']
def __init__(self, *args):
raise TypeError("cannot instantiate %r" % (self.__class__,))