From: Jiri Benc Date: Tue, 6 Oct 2020 17:16:02 +0000 (+0200) Subject: bindings: python: fix incorrect object size X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3ffa77c4c29392e88007bd562f4562fc4b0bcc9a;p=qemu-gpiodev%2Flibgpiod.git bindings: python: fix incorrect object size tp_basicsize is the size of the allocated object, not of the class. Fixes: 96c524c4951c ("bindings: implement python bindings") Signed-off-by: Jiri Benc Signed-off-by: Bartosz Golaszewski --- diff --git a/bindings/python/gpiodmodule.c b/bindings/python/gpiodmodule.c index e5db26b..b3ae2bf 100644 --- a/bindings/python/gpiodmodule.c +++ b/bindings/python/gpiodmodule.c @@ -1874,7 +1874,7 @@ PyDoc_STRVAR(gpiod_LineBulkType_doc, static PyTypeObject gpiod_LineBulkType = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "gpiod.LineBulk", - .tp_basicsize = sizeof(gpiod_LineBulkType), + .tp_basicsize = sizeof(gpiod_LineBulkObject), .tp_flags = Py_TPFLAGS_DEFAULT, .tp_doc = gpiod_LineBulkType_doc, .tp_new = PyType_GenericNew,