summaryrefslogtreecommitdiff
path: root/src/cmd/api
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-16 10:22:15 -0400
committerRuss Cox <rsc@golang.org>2014-09-16 10:22:15 -0400
commit5819f77545053174374fc02ff3e09b6a6591c22c (patch)
treec7698f0ca27a64cd0de49e36c5d0501ab187ddd7 /src/cmd/api
parentf1e298b92fb8286ed1b9aa24f3cdfa5dd9e0841b (diff)
downloadgo-5819f77545053174374fc02ff3e09b6a6591c22c.tar.gz
runtime: remove duplicated Go constants
The C header files are the single point of truth: every C enum constant Foo is available to Go as _Foo. Remove or redirect duplicate Go declarations so they cannot be out of sync. Eventually we will need to put constants in Go, but for now having them be out of sync with C is too risky. These predate the build support for auto-generating Go constants from the C definitions. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/141510043
Diffstat (limited to 'src/cmd/api')
-rw-r--r--src/cmd/api/goapi.go46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go
index 8494a3f61..78b7d6edf 100644
--- a/src/cmd/api/goapi.go
+++ b/src/cmd/api/goapi.go
@@ -423,6 +423,52 @@ func (w *Walker) parseFile(dir, file string) (*ast.File, error) {
" _Genqueue = 7;" +
" _Gcopystack = 8;" +
" _NSIG = 32;" +
+ " _FlagNoScan = iota;" +
+ " _FlagNoZero;" +
+ " _TinySize;" +
+ " _TinySizeClass;" +
+ " _MaxSmallSize;" +
+ " _PageShift;" +
+ " _PageSize;" +
+ " _PageMask;" +
+ " _BitsPerPointer;" +
+ " _BitsMask;" +
+ " _PointersPerByte;" +
+ " _MaxGCMask;" +
+ " _BitsDead;" +
+ " _BitsPointer;" +
+ " _MSpanInUse;" +
+ " _ConcurrentSweep;" +
+ " _KindBool;" +
+ " _KindInt;" +
+ " _KindInt8;" +
+ " _KindInt16;" +
+ " _KindInt32;" +
+ " _KindInt64;" +
+ " _KindUint;" +
+ " _KindUint8;" +
+ " _KindUint16;" +
+ " _KindUint32;" +
+ " _KindUint64;" +
+ " _KindUintptr;" +
+ " _KindFloat32;" +
+ " _KindFloat64;" +
+ " _KindComplex64;" +
+ " _KindComplex128;" +
+ " _KindArray;" +
+ " _KindChan;" +
+ " _KindFunc;" +
+ " _KindInterface;" +
+ " _KindMap;" +
+ " _KindPtr;" +
+ " _KindSlice;" +
+ " _KindString;" +
+ " _KindStruct;" +
+ " _KindUnsafePointer;" +
+ " _KindDirectIface;" +
+ " _KindGCProg;" +
+ " _KindNoPointers;" +
+ " _KindMask;" +
")"
f, err = parser.ParseFile(fset, filename, src, 0)
if err != nil {