From b5f03dd2b7d55b9a632c8771be4ae1a05c2f7fb8 Mon Sep 17 00:00:00 2001 From: Marcel Moreaux Date: Mon, 19 Jul 2021 11:04:31 +0200 Subject: Fix handling of c_void_p args in MpvRenderParam.__init__() Handling of c_void_p args (x11_display, wl_display) was broken. Added a case to correctly handle the c_void_p constructor case. See https://github.com/jaseg/python-mpv/issues/169 --- mpv.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mpv.py b/mpv.py index fa2146e..a125d45 100644 --- a/mpv.py +++ b/mpv.py @@ -225,6 +225,9 @@ class MpvRenderParam(Structure): elif cons is bool: self.value = c_int(int(bool(value))) self.data = cast(pointer(self.value), c_void_p) + elif cons is c_void_p: + self.value = value + self.data = cast(self.value, c_void_p) else: self.value = cons(**value) self.data = cast(pointer(self.value), c_void_p) -- cgit