[pypy-svn] r72841 - pypy/branch/cpython-extension/pypy/module/cpyext

xoraxax at codespeak.net xoraxax at codespeak.net
Thu Mar 25 19:24:41 CET 2010


Author: xoraxax
Date: Thu Mar 25 19:24:40 2010
New Revision: 72841

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/TODO
   pypy/branch/cpython-extension/pypy/module/cpyext/macros.py
Log:
Add comments and TODO items.

Modified: pypy/branch/cpython-extension/pypy/module/cpyext/TODO
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/TODO	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/TODO	Thu Mar 25 19:24:40 2010
@@ -2,8 +2,14 @@
  - Complete the PyTypeObject initialization code.
  - properly support "borrowed" references: the PyObject must be stored
    somewhere
+ - Use a WeakKeyDictionary to count how often a PyObject is allocated for
+   a given wrapped object and use this to assess whether optimizations are
+   useful
  - lltype.free in PyObject_Del() sometimes raise an exception (but all
    tests pass)
+   - Reported by Amaury
+   - Alexander cannot reproduce it
+
 
 PyStringObject support
 ======================

Modified: pypy/branch/cpython-extension/pypy/module/cpyext/macros.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/macros.py	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/macros.py	Thu Mar 25 19:24:40 2010
@@ -18,6 +18,8 @@
         ptr = ctypes.addressof(obj._obj._storage)
         if ptr not in state.py_objects_r2w and \
             space.is_w(from_ref(space, obj.c_obj_type), space.w_str):
+            # this is a half-allocated string, lets call the deallocator
+            # directly
             string_dealloc(space, obj)
         else:
             w_obj = state.py_objects_r2w.pop(ptr)



More information about the Pypy-commit mailing list