Skip to content

Commit

Permalink
Merge pull request #114 from karlpip/constevent
Browse files Browse the repository at this point in the history
Adjust event dispatch C function prototype
  • Loading branch information
adrg authored Sep 13, 2024
2 parents a112a1a + 933ffa9 commit 476ec89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions v3/event_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ package vlc
#cgo LDFLAGS: -lvlc
#include <vlc/vlc.h>
extern void eventDispatch(libvlc_event_t*, void*);
typedef const libvlc_event_t constev;
extern void eventDispatch(constev*, void*);
static inline int eventAttach(libvlc_event_manager_t* em, libvlc_event_type_t et, unsigned long userData) {
return libvlc_event_attach(em, et, eventDispatch, (void*)userData);
Expand Down Expand Up @@ -72,7 +73,7 @@ func (em *EventManager) Detach(eventIDs ...EventID) {
}

//export eventDispatch
func eventDispatch(event *C.libvlc_event_t, userData unsafe.Pointer) {
func eventDispatch(event *C.constev, userData unsafe.Pointer) {
if err := inst.assertInit(); err != nil {
return
}
Expand Down

0 comments on commit 476ec89

Please sign in to comment.