04.C_struct

command
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 2 Imported by: 0

README

C.int など

import "C" をすることによって、C言語側の型が使えるようになる。

C言語側にて定義されている構造体も C.構造体 でアクセス出来る。

特例として、Go側にてC言語側の構造体を変数宣言した場合 自動的にゼロクリアされた状態となる。(memset(&stx, 0, sizeof(stx))と同じ状態) これは、Goの変数初期化のルールが適用されるため(ゼロ値)。

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL