projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c77a82
)
Fixed _bsddb key allocation errors.
author
Alexandre Vassalotti
<alexandre@peadrop.com>
Tue, 10 Jun 2008 16:43:26 +0000
(16:43 +0000)
committer
Alexandre Vassalotti
<alexandre@peadrop.com>
Tue, 10 Jun 2008 16:43:26 +0000
(16:43 +0000)
Modules/_bsddb.c
patch
|
blob
|
history
diff --git
a/Modules/_bsddb.c
b/Modules/_bsddb.c
index 3a67a1e600a8c5f2db0e34434afd87a21230567c..9e3102967c51f0dfed7037bb615bb06c6c23f5d5 100644
(file)
--- a/
Modules/_bsddb.c
+++ b/
Modules/_bsddb.c
@@
-312,6
+312,10
@@
static Py_buffer * _malloc_view(PyObject *obj)
"Py_buffer malloc failed");
return NULL;
}
+
+ if (PyObject_GetBuffer(obj, view, PyBUF_SIMPLE))
+ return NULL;
+
if (view->ndim > 1) {
PyErr_SetString(PyExc_BufferError,
"buffers must be single dimension");