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
553c98dc
Commit
553c98dc
authored
Nov 05, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix renamed-package bug in exported names:
always show original name R=ken OCL=18603 CL=18603
parent
11a3f759
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
src/cmd/gc/subr.c
src/cmd/gc/subr.c
+7
-14
No files found.
src/cmd/gc/subr.c
View file @
553c98dc
...
...
@@ -912,14 +912,13 @@ out:
int
Sconv
(
Fmt
*
fp
)
{
char
buf
[
500
];
Sym
*
s
;
char
*
opk
,
*
pkg
,
*
nam
;
s
=
va_arg
(
fp
->
args
,
Sym
*
);
if
(
s
==
S
)
{
snprint
(
buf
,
sizeof
(
buf
)
,
"<S>"
);
goto
out
;
fmtstrcpy
(
fp
,
"<S>"
);
return
0
;
}
pkg
=
"<nil>"
;
...
...
@@ -934,18 +933,12 @@ Sconv(Fmt *fp)
nam
=
s
->
name
;
if
(
!
(
fp
->
flags
&
FmtShort
))
if
(
strcmp
(
pkg
,
package
)
||
strcmp
(
opk
,
package
)
||
(
fp
->
flags
&
FmtLong
))
{
if
(
strcmp
(
opk
,
pkg
)
==
0
)
{
snprint
(
buf
,
sizeof
(
buf
),
"%s.%s"
,
pkg
,
nam
);
goto
out
;
}
snprint
(
buf
,
sizeof
(
buf
),
"(%s)%s.%s"
,
opk
,
pkg
,
nam
);
goto
out
;
if
(
strcmp
(
opk
,
package
)
||
(
fp
->
flags
&
FmtLong
))
{
fmtprint
(
fp
,
"%s.%s"
,
opk
,
nam
);
return
0
;
}
snprint
(
buf
,
sizeof
(
buf
),
"%s"
,
nam
);
out:
return
fmtstrcpy
(
fp
,
buf
);
fmtstrcpy
(
fp
,
nam
);
return
0
;
}
static
char
*
...
...
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