Author: neal.norwitz
Date: Sun Oct  7 21:26:50 2007
New Revision: 58352

Modified:
   python/branches/py3k/Objects/memoryobject.c
Log:
At least one of the buildbots was complaining about newview being used
without being initialized.  Also make the code conform to the comment and
return the new object.  This code needs a test!


Modified: python/branches/py3k/Objects/memoryobject.c
==============================================================================
--- python/branches/py3k/Objects/memoryobject.c (original)
+++ python/branches/py3k/Objects/memoryobject.c Sun Oct  7 21:26:50 2007
@@ -513,12 +513,11 @@
                else {
                        /* Return a new memory-view object */
                        Py_buffer newview;
-                       PyMemoryView_FromMemory(&newview);
+                       memset(&newview, 0, sizeof(newview));
+                       return PyMemoryView_FromMemory(&newview);
                }
        }
 
-
-
         Py_INCREF(Py_NotImplemented);
         return Py_NotImplemented;
 }
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to