pywayland icon indicating copy to clipboard operation
pywayland copied to clipboard

lib.signal_init() is not found, constructing a Signal without pointer uses wl_listener pointer

Open heuer opened this issue 10 months ago • 0 comments

While writing a test case for #61 I got an error, that lib.signal_init was not found. Looking at the issue, I saw that Signal creates a pointer to a wl_listener and not to a wl_signal:

https://github.com/flacjacket/pywayland/blob/4febe9b7c22b61ace7902109904f2a298c510169/pywayland/server/listener.py#L96C1-L99C42

        if ptr is None:
            self._ptr = ffi.new("struct wl_listener *")
            lib.wl_signal_init(self._ptr)
        else:
            self._ptr = ptr

I address this issue with a fix for #61.

Please review.

heuer avatar Apr 12 '24 12:04 heuer