[pypy-svn] r31595 - pypy/branch/no-zeroing-assumption/pypy/translator/c/src

mwh at codespeak.net mwh at codespeak.net
Thu Aug 24 13:19:23 CEST 2006


Author: mwh
Date: Thu Aug 24 13:19:22 2006
New Revision: 31595

Modified:
   pypy/branch/no-zeroing-assumption/pypy/translator/c/src/mem.h
Log:
zero cpy allocations too


Modified: pypy/branch/no-zeroing-assumption/pypy/translator/c/src/mem.h
==============================================================================
--- pypy/branch/no-zeroing-assumption/pypy/translator/c/src/mem.h	(original)
+++ pypy/branch/no-zeroing-assumption/pypy/translator/c/src/mem.h	Thu Aug 24 13:19:22 2006
@@ -140,6 +140,7 @@
     /* XXX add tp_itemsize later */                             \
     OP_RAW_MALLOC(((PyTypeObject *)cpytype)->tp_basicsize, r, restype);  \
     if (r) {                                                    \
+        OP_RAW_MEM_ZERO(r, ((PyTypeObject *)cpytype)->tp_basicsize); \
         PyObject_Init((PyObject *)r, (PyTypeObject *)cpytype);  \
     }                                                           \
   }



More information about the Pypy-commit mailing list