[pypy-svn] r51597 - pypy/dist/pypy/lib/_ctypes

fijal at codespeak.net fijal at codespeak.net
Mon Feb 18 17:49:29 CET 2008


Author: fijal
Date: Mon Feb 18 17:49:28 2008
New Revision: 51597

Modified:
   pypy/dist/pypy/lib/_ctypes/pointer.py
Log:
missing free.


Modified: pypy/dist/pypy/lib/_ctypes/pointer.py
==============================================================================
--- pypy/dist/pypy/lib/_ctypes/pointer.py	(original)
+++ pypy/dist/pypy/lib/_ctypes/pointer.py	Mon Feb 18 17:49:28 2008
@@ -122,6 +122,7 @@
         ptr = tp.__new__(tp)
         ptr._buffer = tp._ffiarray(1)
         ptr._buffer[0] = obj._buffer
+        ptr._needs_free = True
         return ptr
     if isinstance(obj, (int, long)):
         result = tp()
@@ -132,4 +133,5 @@
                         % (type(obj),))
     result = tp()
     result._buffer[0] = obj._buffer[0]
+    result._needs_free = True
     return result



More information about the Pypy-commit mailing list