Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
5b257732
Commit
5b257732
authored
Mar 30, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
godefs: fix handling of negative constants
R=r CC=golang-dev
https://golang.org/cl/849041
parent
00f9f0c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/cmd/godefs/main.c
src/cmd/godefs/main.c
+8
-2
No files found.
src/cmd/godefs/main.c
View file @
5b257732
...
...
@@ -294,8 +294,14 @@ Continue:
Bprint
(
bout
,
"// Constants
\n
"
);
if
(
ncon
>
0
)
{
Bprint
(
bout
,
lang
->
constbegin
);
for
(
i
=
0
;
i
<
ncon
;
i
++
)
Bprint
(
bout
,
lang
->
constfmt
,
con
[
i
].
name
,
con
[
i
].
value
&
0xFFFFFFFF
);
for
(
i
=
0
;
i
<
ncon
;
i
++
)
{
// Go can handle negative constants,
// but C enums may not be able to.
if
(
lang
==
&
go
)
Bprint
(
bout
,
lang
->
constfmt
,
con
[
i
].
name
,
con
[
i
].
value
);
else
Bprint
(
bout
,
lang
->
constfmt
,
con
[
i
].
name
,
con
[
i
].
value
&
0xFFFFFFFF
);
}
Bprint
(
bout
,
lang
->
constend
);
}
Bprint
(
bout
,
"
\n
"
);
...
...
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