-
Notifications
You must be signed in to change notification settings - Fork 17.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-branch.go1.9] cmd/cgo: avoid using common names for sniffing
Current code uses names like "x" and "s" which can conflict with user's code easily. Use cryptographic names. Fixes #21668 Change-Id: Ib6d3d6327aa5b92d95c71503d42e3a79d96c8e16 Reviewed-on: https://go-review.googlesource.com/59710 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-on: https://go-review.googlesource.com/59730 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hiroshi Ioka <hirochachacha@gmail.com> Reviewed-by: Chris Broadfoot <cbro@golang.org> Reviewed-on: https://go-review.googlesource.com/70849 Run-TryBot: Russ Cox <rsc@golang.org>
- Loading branch information
1 parent
f69668e
commit 33ce168
Showing
2 changed files
with
23 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// Fail to guess the kind of the constant "x". | ||
// No runtime test; just make sure it compiles. | ||
|
||
package cgotest | ||
|
||
// const int x = 42; | ||
import "C" | ||
|
||
var issue21668_X = C.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters