command
Version:
v0.2.1
Opens a new window with list of versions in this module.
Published: May 24, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
これは何?
cgoを利用している場合で、C側の関数に NULL
を渡すやり方についてのサンプルです。
NULL
を渡すには、Goの nil
を使って以下のようにします。
unsafe.Pointer(nil)
あとは、これを関数の引数の型に合わせてキャストして渡します。
サンプルを実行すると以下のようになります。
$ task
task: [default] go run .
NULL ==> -1
NOT NULL ==> 0
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.