summaryrefslogtreecommitdiffstats
path: root/Objects/bufferobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/bufferobject.c')
-rw-r--r--Objects/bufferobject.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c
index 674d2b5..da8d9fc 100644
--- a/Objects/bufferobject.c
+++ b/Objects/bufferobject.c
@@ -192,7 +192,10 @@ buffer_new(PyTypeObject *type, PyObject *args, PyObject *kw)
int offset = 0;
int size = Py_END_OF_BUFFER;
- if ( !PyArg_ParseTuple(args, "O|ii:buffer", &ob, &offset, &size) )
+ if (!_PyArg_NoKeywords("buffer()", kw))
+ return NULL;
+
+ if (!PyArg_ParseTuple(args, "O|ii:buffer", &ob, &offset, &size))
return NULL;
return PyBuffer_FromObject(ob, offset, size);
}