doCGoCall does the cgo call by converting CGoCallResHandle to C.int and *C.char and calls doCGoCall. The reason to have this wrapper is because CGo types are bound to package name, thereby even C.int are different types under different packages.
(f func() C.CGoCallResHandle)
| 739 | // The reason to have this wrapper is because CGo types are bound to package name, thereby even C.int are different types |
| 740 | // under different packages. |
| 741 | func doCGoCall(f func() C.CGoCallResHandle) uintptr { |
| 742 | return cgoutils.DoCGoCall(func() (uintptr, unsafe.Pointer) { |
| 743 | ret := f() |
| 744 | return uintptr(ret.res), unsafe.Pointer(ret.pStrErr) |
| 745 | }) |
| 746 | } |
| 747 | |
| 748 | // bootstrapDevice is the go wrapper of BootstrapDevice. It will panic and crash the server if any exceptions are thrown |
| 749 | // in this function. |
no test coverage detected