cgo: note that CString result must be freed

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4968054
This commit is contained in:
Gustavo Niemeyer 2011-08-31 06:44:55 -03:00
parent 95429d82f1
commit 0cfa0fe242
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ the pointer to the first element explicitly: C.f(&x[0]).
A few special functions convert between Go and C types
by making copies of the data. In pseudo-Go definitions:
// Go string to C string
// Go string to C string - result is not garbage collected
func C.CString(string) *C.char
// C string to Go string

View File

@ -18,7 +18,7 @@ x_cgo_malloc(void *p)
void (*_cgo_malloc)(void*) = x_cgo_malloc;
/* Stub for calling from Go */
/* Stub for calling free from Go */
static void
x_cgo_free(void *p)
{