Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
b94f341b
Commit
b94f341b
authored
May 22, 2010
by
Devon H. O'Dell
Committed by
Russ Cox
May 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgo: better error for no C symbols
R=rsc, iant CC=golang-dev, graeme.perrow
https://golang.org/cl/1193046
parent
13d5a19a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
main.go
src/cmd/cgo/main.go
+5
-0
No files found.
src/cmd/cgo/main.go
View file @
b94f341b
...
@@ -83,6 +83,11 @@ func main() {
...
@@ -83,6 +83,11 @@ func main() {
// Reset p.Preamble so that we don't end up with conflicting headers / defines
// Reset p.Preamble so that we don't end up with conflicting headers / defines
p
.
Preamble
=
builtinProlog
p
.
Preamble
=
builtinProlog
openProg
(
input
,
p
)
openProg
(
input
,
p
)
if
len
(
p
.
Vardef
)
==
0
&&
len
(
p
.
Funcdef
)
==
0
&&
len
(
p
.
Enumdef
)
==
0
&&
len
(
p
.
Constdef
)
==
0
{
fatal
(
"no C symbols were used in cgo file "
+
input
)
}
for
_
,
cref
:=
range
p
.
Crefs
{
for
_
,
cref
:=
range
p
.
Crefs
{
// Convert C.ulong to C.unsigned long, etc.
// Convert C.ulong to C.unsigned long, etc.
if
expand
,
ok
:=
expandName
[
cref
.
Name
];
ok
{
if
expand
,
ok
:=
expandName
[
cref
.
Name
];
ok
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment