Remove io interrupter interface

This commit is contained in:
Quentin Renard
2024-03-01 16:15:03 +01:00
parent 66486624e0
commit d3d2df833b
2 changed files with 5 additions and 11 deletions

View File

@@ -15,23 +15,17 @@ AVIOInterruptCB astiavNewInterruptCallback(int *ret)
*/
import "C"
type IOInterrupter interface {
Interrupt()
}
var _ IOInterrupter = (*ioInterrupter)(nil)
type ioInterrupter struct {
type IOInterrupter struct {
c C.struct_AVIOInterruptCB
i C.int
}
func newIOInterrupter() *ioInterrupter {
cb := &ioInterrupter{}
func newIOInterrupter() *IOInterrupter {
cb := &IOInterrupter{}
cb.c = C.astiavNewInterruptCallback(&cb.i)
return cb
}
func (cb *ioInterrupter) Interrupt() {
func (cb *IOInterrupter) Interrupt() {
cb.i = 1
}