command
Version:
v0.2.5
Opens a new window with list of versions in this module.
Published: Dec 12, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
C.ByteSliceToVoidPtr
C.CBytes()
を用いずに、[]byte
を(void *)
に変換するには以下の手順を踏む。
- スライスの先頭要素のポインタを取得
unsafe.Pointer
を取得
cgoでは、unsafe.Pointer()
がCの (void *)
に当たる。
Cでは配列は「先頭要素のポインタ」を表しているが、Goではそれが出来ない。
なので、明示的に先頭要素のポインタを指定する必要がある。
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.