summaryrefslogtreecommitdiff
path: root/src/cmd/cgo/ast.go
diff options
context:
space:
mode:
authorDevon H. O'Dell <devon.odell@gmail.com>2010-01-11 13:05:26 -0800
committerDevon H. O'Dell <devon.odell@gmail.com>2010-01-11 13:05:26 -0800
commitf34c99b649cd2165e8560187d7bc80fedcbfa1eb (patch)
treeb1407402c281c9aeba52565d78b55e8379a161ce /src/cmd/cgo/ast.go
parentde958b4c4532b804ec2fc55e0abd63229ed2275f (diff)
downloadgolang-f34c99b649cd2165e8560187d7bc80fedcbfa1eb.tar.gz
cgo: Make constants #define'd in C available to Go (as consts)
Fixes issue 435 R=rsc CC=golang-dev http://codereview.appspot.com/181161 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/cgo/ast.go')
-rw-r--r--src/cmd/cgo/ast.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/cgo/ast.go b/src/cmd/cgo/ast.go
index 7d6221369..d96a8bd9d 100644
--- a/src/cmd/cgo/ast.go
+++ b/src/cmd/cgo/ast.go
@@ -19,7 +19,7 @@ import (
type Cref struct {
Name string
Expr *ast.Expr
- Context string // "type", "expr", or "call"
+ Context string // "type", "expr", "const", or "call"
TypeName bool // whether xxx is a C type name
Type *Type // the type of xxx
FuncType *FuncType
@@ -36,6 +36,7 @@ type Prog struct {
Vardef map[string]*Type
Funcdef map[string]*FuncType
Enumdef map[string]int64
+ Constdef map[string]string
PtrSize int64
GccOptions []string
OutDefs map[string]bool