[Python-3000-checkins] r58352 - python/branches/py3k/Objects/memoryobject.c
neal.norwitz
python-3000-checkins at python.org
Sun Oct 7 21:26:51 CEST 2007
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;
}
More information about the Python-3000-checkins
mailing list