]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: mention FakeImportC in Package.Import doc comment
authorAlan Donovan <adonovan@google.com>
Tue, 18 Oct 2022 12:25:51 +0000 (08:25 -0400)
committerAlan Donovan <adonovan@google.com>
Thu, 17 Nov 2022 03:47:35 +0000 (03:47 +0000)
Change-Id: If4a82893f855d86de3311247424b1a3740c1f212
Reviewed-on: https://go-review.googlesource.com/c/go/+/443615
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/types2/package.go
src/go/types/package.go

index 26f10645d28be6eeba0ad5b1df4d1265e397a28f..61670f67181ec71fdccb6f94a45ffa01028bd257 100644 (file)
@@ -59,6 +59,9 @@ func (pkg *Package) MarkComplete() { pkg.complete = true }
 // If pkg was loaded from export data, Imports includes packages that
 // provide package-level objects referenced by pkg. This may be more or
 // less than the set of packages directly imported by pkg's source code.
+//
+// If pkg uses cgo and the FakeImportC configuration option
+// was enabled, the imports list may contain a fake "C" package.
 func (pkg *Package) Imports() []*Package { return pkg.imports }
 
 // SetImports sets the list of explicitly imported packages to list.
index 26385dc39b95fbe41b382f1477cb8f00af5f807c..2b72ff15092ece316a9dd39da8200cec81a5aa1b 100644 (file)
@@ -60,6 +60,9 @@ func (pkg *Package) MarkComplete() { pkg.complete = true }
 // If pkg was loaded from export data, Imports includes packages that
 // provide package-level objects referenced by pkg. This may be more or
 // less than the set of packages directly imported by pkg's source code.
+//
+// If pkg uses cgo and the FakeImportC configuration option
+// was enabled, the imports list may contain a fake "C" package.
 func (pkg *Package) Imports() []*Package { return pkg.imports }
 
 // SetImports sets the list of explicitly imported packages to list.