From f34c99b649cd2165e8560187d7bc80fedcbfa1eb Mon Sep 17 00:00:00 2001 From: "Devon H. O'Dell" Date: Mon, 11 Jan 2010 13:05:26 -0800 Subject: 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 --- src/cmd/cgo/ast.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cmd/cgo/ast.go') 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 -- cgit v1.2.3