From: Ian Lance Taylor
Date: Fri, 25 Aug 2023 23:41:17 +0000 (-0700)
Subject: doc/go1.22: mention new #cgo directives
X-Git-Tag: go1.22rc1~1082
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=59abd0e88b4aecad099f21d00afbb50a78edc4c5;p=gostls13.git
doc/go1.22: mention new #cgo directives
For #56378
Change-Id: I0c9c662c6d765cad6f7bf17fdd648db8d73e429b
Reviewed-on: https://go-review.googlesource.com/c/go/+/522937
Reviewed-by: Dmitri Shuralyov
Reviewed-by: Dmitri Shuralyov
TryBot-Bypass: Ian Lance Taylor
Reviewed-by: Ian Lance Taylor
Auto-Submit: Ian Lance Taylor
---
diff --git a/doc/go1.22.html b/doc/go1.22.html
index 1bf759a9a6..c32669b13a 100644
--- a/doc/go1.22.html
+++ b/doc/go1.22.html
@@ -37,6 +37,27 @@ Do not send CLs removing the interior tags from such phrases.
TODO: complete this section, or delete if not needed
+Cgo
+
+ The special comment that precedes
+ import
"C"
may now include two
+ new #cgo
directives.
+
+ -
+
#cgo
noescape
cFunctionName
+ tells cgo that Go pointers passed to the C function
+ cFunctionName
do not escape.
+
+ -
+
#cgo
nocallback
cFunctionName
+ tells cgo that the C function cFunctionName
does
+ not call any Go functions.
+
+
+ See the cgo
+ documentation for more details.
+
+
Runtime