We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type Foo_args struct { a bool, b int16, c []byte }
这个结构体应该包含全啦 参数和返回值啦~ 为什么下面还要定义一个 type Foo_returns struct{ c[]byte }
下面的函数 Foo(FP *SomeFunc_args,FP_ret *SomeFunc_returns) 有几个问题 0.这里的 SomeFunc_args 和 SomeFunc_returns是指的上面定义的Foo_args和Foo_returns么?
然后第162页一句话 唯一的差异是每个函数的偏移量通过unsafe.Offsetof()函数自动生成 1.函数 = 参数 吧
The text was updated successfully, but these errors were encountered:
Foo_returns 是为了展示重新对齐的需求(类似数组的第二个元素),放前面则不完全一样
Sorry, something went wrong.
chai2010
No branches or pull requests
type Foo_args struct {
a bool,
b int16,
c []byte
}
这个结构体应该包含全啦 参数和返回值啦~ 为什么下面还要定义一个
type Foo_returns struct{
c[]byte
}
下面的函数 Foo(FP *SomeFunc_args,FP_ret *SomeFunc_returns) 有几个问题
0.这里的 SomeFunc_args 和 SomeFunc_returns是指的上面定义的Foo_args和Foo_returns么?
2.uintptr(FP) 需要用 uintptr(unsafe.Pointer(Fp)) 转一下吧
3.我理解args(32字节)已经整个包含 参数和返回值吧, 下面的 framesize = sizeof(args)+sizeof(returns) 这不是增大啦么,这里framsize应该只caller的大小吧
然后第162页一句话
唯一的差异是每个函数的偏移量通过unsafe.Offsetof()函数自动生成
1.函数 = 参数 吧
The text was updated successfully, but these errors were encountered: