From 59abd0e88b4aecad099f21d00afbb50a78edc4c5 Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor
Date: Fri, 25 Aug 2023 16:41:17 -0700
Subject: [PATCH] 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
---
doc/go1.22.html | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
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
--
2.50.0