1

Add hack for Windows, EB_Book size being reported as too small

This commit is contained in:
Alex Yatskov 2021-01-01 20:33:15 -08:00
parent b538e3d6fd
commit 0a9c84fd1d

2
zig.go
View File

@ -71,7 +71,7 @@ func (c *Context) initialize() error {
return fmt.Errorf("eb_initialize_library failed with code %d", errEb)
}
c.book = (*C.EB_Book)(C.calloc(1, C.size_t(unsafe.Sizeof(C.EB_Book{}))))
c.book = (*C.EB_Book)(C.calloc(1, C.size_t(unsafe.Sizeof(C.EB_Book{}))+8))
C.eb_initialize_book(c.book)
c.hookset = (*C.EB_Hookset)(C.calloc(1, C.size_t(unsafe.Sizeof(C.EB_Hookset{}))))