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
318c1eeb
Commit
318c1eeb
authored
Dec 13, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
godefs: guard against structs with pad fields
Fixes #1162. R=r CC=golang-dev
https://golang.org/cl/3619041
parent
9e26c4bd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/cmd/godefs/main.c
src/cmd/godefs/main.c
+3
-3
No files found.
src/cmd/godefs/main.c
View file @
318c1eeb
...
...
@@ -133,7 +133,7 @@ Lang go =
"type %s struct {
\n
"
,
"type %s struct {
\n
"
,
"
\t
Pad%d [%d]byte;
\n
"
,
"
\t
Pad
_godefs_
%d [%d]byte;
\n
"
,
"}
\n
"
,
gotypefmt
,
...
...
@@ -150,7 +150,7 @@ Lang c =
"typedef struct %s %s;
\n
struct %s {
\n
"
,
"typedef union %s %s;
\n
union %s {
\n
"
,
"
\t
byte pad%d[%d];
\n
"
,
"
\t
byte pad
_godefs_
%d[%d];
\n
"
,
"};
\n
"
,
ctypefmt
,
...
...
@@ -391,7 +391,7 @@ Continue:
if
(
cutprefix
(
name
))
name
+=
prefix
;
if
(
strcmp
(
name
,
""
)
==
0
)
{
snprint
(
nambuf
,
sizeof
nambuf
,
"Pad%d"
,
npad
++
);
snprint
(
nambuf
,
sizeof
nambuf
,
"Pad
_godefs_
%d"
,
npad
++
);
name
=
nambuf
;
}
Bprint
(
bout
,
"
\t
%#lT;
\n
"
,
name
,
f
->
type
);
...
...
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