05.C_string

command
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 3 Imported by: 0

README

C.string

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

C言語側の文字列をcgoにて利用する場合は、C.CString を利用する。 C.CString は、内部で malloc() によりヒープメモリを確保しているため 利用後に必ず C.free() にてメモリを開放する必要がある。

C.CString は、C言語の (char *) を表す。

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