mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 06:55:07 +00:00
Go binding: Change C.long
to C.int64_t
when call wasm_runtime_set_wasi_args_ex (#3235)
- Change `C.long` to `C.int64_t` due to error: ```sh ./module.go:119:64: cannot use _Ctype_long(stdinfd) (value of type _Ctype_long) as _Ctype_longlong value in variable declaration ./module.go:120:43: cannot use _Ctype_long(stdoutfd) (value of type _Ctype_long) as _Ctype_longlong value in variable declaration ./module.go:120:60: cannot use _Ctype_long(stderrfd) (value of type _Ctype_long) as _Ctype_longlong value in variable declaration ``` - Change offset from `uint32` to `uint64` due to casting error ps. https://github.com/bytecodealliance/wasm-micro-runtime/issues/3220 https://stackoverflow.com/questions/70243683/how-to-convert-c-uint64-t-to-cgo-consistently-across-os
This commit is contained in:
parent
cef88deedb
commit
b4941b0cde
|
@ -87,7 +87,7 @@ func main() {
|
|||
var instance *wamr.Instance
|
||||
var argv []uint32
|
||||
var results []interface{}
|
||||
var offset uint32
|
||||
var offset uint64
|
||||
var native_addr *uint8
|
||||
var err error
|
||||
|
||||
|
|
|
@ -117,8 +117,8 @@ func (self *Module) SetWasiArgsEx(dirList [][]byte, mapDirList [][]byte,
|
|||
C.wasm_runtime_set_wasi_args_ex(self.module, dirPtr, dirCount,
|
||||
mapDirPtr, mapDirCount,
|
||||
envPtr, envCount, argvPtr, argc,
|
||||
C.long(stdinfd), C.long(stdoutfd),
|
||||
C.long(stderrfd))
|
||||
C.int64_t(stdinfd), C.int64_t(stdoutfd),
|
||||
C.int64_t(stderrfd))
|
||||
}
|
||||
|
||||
/* Set module's wasi network address pool */
|
||||
|
|
Loading…
Reference in New Issue
Block a user