aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Benc <jbenc@upir.cz>2020-10-06 19:16:02 +0200
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-10-09 09:45:51 +0200
commit215d6c4ca20c89ae8a9e9d0ccf3704cbde4d2674 (patch)
treeae8a47f3114b33286f19fcb1c653eab988386bc4
parent452e4bac0c85addf7126ddcd039b323f3beba8f5 (diff)
downloadlibgpiod-215d6c4ca20c89ae8a9e9d0ccf3704cbde4d2674.tar.gz
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 <jbenc@upir.cz> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
-rw-r--r--bindings/python/gpiodmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bindings/python/gpiodmodule.c b/bindings/python/gpiodmodule.c
index 72f361ae..da72b504 100644
--- a/bindings/python/gpiodmodule.c
+++ b/bindings/python/gpiodmodule.c
@@ -1395,7 +1395,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,