refactor(c/libuv): Use cgo alias replace struct assertion in fs

refactro(c/libuv): Use cgo alias avoid implicit struct member declaration
This commit is contained in:
hackerchai
2024-08-06 16:05:09 +08:00
parent 9a61e374b5
commit 26f8ce7b5a
2 changed files with 36 additions and 48 deletions

View File

@@ -1,5 +1,9 @@
package libuv
//#cgo pkg-config: libuv
//#include <uv.h>
import "C"
import (
_ "unsafe"
@@ -68,9 +72,7 @@ type File c.Int
/* Handle types. */
type Fs struct {
Unused [440]byte
}
type Fs C.uv_fs_t
type FsEvent struct {
Unused [0]byte