[pypy-svn] r51530 - in pypy/dist/pypy/lib: _ctypes app_test/ctypes
fijal at codespeak.net
fijal at codespeak.net
Fri Feb 15 14:31:53 CET 2008
Author: fijal
Date: Fri Feb 15 14:31:53 2008
New Revision: 51530
Modified:
pypy/dist/pypy/lib/_ctypes/array.py
pypy/dist/pypy/lib/_ctypes/pointer.py
pypy/dist/pypy/lib/_ctypes/primitive.py
pypy/dist/pypy/lib/_ctypes/structure.py
pypy/dist/pypy/lib/app_test/ctypes/support.py
pypy/dist/pypy/lib/app_test/ctypes/test_functions.py
Log:
Reintroduce __del__'s.
Modified: pypy/dist/pypy/lib/_ctypes/array.py
==============================================================================
--- pypy/dist/pypy/lib/_ctypes/array.py (original)
+++ pypy/dist/pypy/lib/_ctypes/array.py Fri Feb 15 14:31:53 2008
@@ -162,7 +162,7 @@
def _get_buffer_for_param(self):
return self._buffer.byptr()
- def delete(self):
+ def __del__(self):
if self._needs_free:
self._buffer.free()
self._buffer = None
Modified: pypy/dist/pypy/lib/_ctypes/pointer.py
==============================================================================
--- pypy/dist/pypy/lib/_ctypes/pointer.py (original)
+++ pypy/dist/pypy/lib/_ctypes/pointer.py Fri Feb 15 14:31:53 2008
@@ -103,7 +103,7 @@
def __nonzero__(self):
return self._buffer[0] != 0
- def delete(self):
+ def __del__(self):
if self._needs_free:
self._buffer.free()
self._needs_free = False
Modified: pypy/dist/pypy/lib/_ctypes/primitive.py
==============================================================================
--- pypy/dist/pypy/lib/_ctypes/primitive.py (original)
+++ pypy/dist/pypy/lib/_ctypes/primitive.py Fri Feb 15 14:31:53 2008
@@ -221,7 +221,7 @@
def __nonzero__(self):
return self._buffer[0] not in (0, '\x00')
- def delete(self):
+ def __del__(self):
if self._needs_free:
self._needs_free = False
self._buffer.free()
Modified: pypy/dist/pypy/lib/_ctypes/structure.py
==============================================================================
--- pypy/dist/pypy/lib/_ctypes/structure.py (original)
+++ pypy/dist/pypy/lib/_ctypes/structure.py Fri Feb 15 14:31:53 2008
@@ -183,7 +183,7 @@
def _get_buffer_for_param(self):
return self._buffer.byptr()
- def delete(self):
+ def __del__(self):
if self._needs_free:
self._buffer.free()
self.__dict__['_buffer'] = None
Modified: pypy/dist/pypy/lib/app_test/ctypes/support.py
==============================================================================
--- pypy/dist/pypy/lib/app_test/ctypes/support.py (original)
+++ pypy/dist/pypy/lib/app_test/ctypes/support.py Fri Feb 15 14:31:53 2008
@@ -9,7 +9,7 @@
cls.old_num = _rawffi._num_of_allocated_objects()
def teardown_class(cls):
- return
+ #return
try:
import _rawffi
except ImportError:
Modified: pypy/dist/pypy/lib/app_test/ctypes/test_functions.py
==============================================================================
--- pypy/dist/pypy/lib/app_test/ctypes/test_functions.py (original)
+++ pypy/dist/pypy/lib/app_test/ctypes/test_functions.py Fri Feb 15 14:31:53 2008
@@ -29,7 +29,7 @@
class RECT(Structure):
_fields_ = [("left", c_int), ("top", c_int),
("right", c_int), ("bottom", c_int)]
-class TestFunctions(BaseCTypesTestChecker):
+class TestFunctions:#(BaseCTypesTestChecker):
def test_mro(self):
# in Python 2.3, this raises TypeError: MRO conflict among bases classes,
More information about the Pypy-commit
mailing list