Skip to content

Commit

Permalink
Adjust event dispatch C function prototype in v2
Browse files Browse the repository at this point in the history
  • Loading branch information
adrg committed Sep 13, 2024
1 parent 476ec89 commit 1b746d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<h3 align="center">Handcrafted Go bindings for libVLC and high-level media player interface</h3>

<p align="center">
<a href="https://github.com/adrg/libvlc-go/actions/workflows/ci.yml">
<img alt="Build status" src="https://github.com/adrg/libvlc-go/actions/workflows/ci.yml/badge.svg">
<a href="https://github.com/adrg/libvlc-go/actions/workflows/lint-v3.yml">
<img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/adrg/libvlc-go/lint-v3.yml">
</a>
<a href="https://pkg.go.dev/github.com/adrg/libvlc-go/v3">
<img alt="pkg.go.dev documentation" src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white">
Expand Down Expand Up @@ -212,7 +212,8 @@ See [CONTRIBUTING.MD](CONTRIBUTING.md).
[tarrsalah](https://github.com/tarrsalah),
[danielpellon](https://github.com/danielpellon),
[patknight](https://github.com/patknight),
[sndnvaps](https://github.com/sndnvaps).
[sndnvaps](https://github.com/sndnvaps),
[karlpip](https://github.com/karlpip).

## Discord server

Expand Down
5 changes: 3 additions & 2 deletions v2/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 1b746d7

Please sign in to comment.