Merge pull request #718 from spongehah/c/libuv

refactor(c/libuv): Add multiple struct size
This commit is contained in:
xushiwei
2024-08-15 18:18:58 +08:00
committed by GitHub
2 changed files with 15 additions and 9 deletions

View File

@@ -83,18 +83,21 @@ type Tcp struct {
Unused [256]byte
}
// TODO(spongehah): Udp
type Udp struct {
Unused [0]byte
Unused [224]byte
}
/* Request types. */
// TODO(spongehah): Req
type Req struct {
Unused [0]byte
Unused [64]byte
}
// TODO(spongehah): UdpSend
type UdpSend struct {
Unused [0]byte
Unused [320]byte
}
// TODO(spongehah): Write
@@ -109,16 +112,19 @@ type Connect struct {
Unused [88]byte
}
// TODO(spongehah): GetAddrInfo
type GetAddrInfo struct {
Unused [0]byte
Unused [160]byte
}
// TODO(spongehah): GetNameInfo
type GetNameInfo struct {
Unused [0]byte
Unused [1320]byte
}
// TODO(spongehah): Shutdown
type Shutdown struct {
Unused [0]byte
Unused [80]byte
}
// ----------------------------------------------

View File

@@ -12,12 +12,12 @@ import (
// TODO(spongehah): Timer
type Timer struct {
Unused [0]byte
Unused [152]byte
}
// ----------------------------------------------
// llgo:type Cgit
// llgo:type C
type TimerCb func(timer *Timer)
// ----------------------------------------------
@@ -28,7 +28,7 @@ type TimerCb func(timer *Timer)
func InitTimer(loop *Loop, timer *Timer) c.Int
// llgo:link (*Timer).Start C.uv_timer_start
func (timer *Timer) Start(cb TimerCb, timeout uint64, repeat uint64) c.Int {
func (timer *Timer) Start(cb TimerCb, timeoutMs uint64, repeat uint64) c.Int {
return 0
}