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
bf616471
Commit
bf616471
authored
Dec 09, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conversion to/from
any pointer or uintptr and unsafe.pointer R=r OCL=20795 CL=20795
parent
1d4daa2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
walk.c
src/cmd/gc/walk.c
+16
-0
No files found.
src/cmd/gc/walk.c
View file @
bf616471
...
...
@@ -622,6 +622,22 @@ loop:
goto
ret
;
}
// convert to unsafe.pointer
if
(
isptrto
(
n
->
type
,
TANY
))
{
if
(
isptr
[
l
->
type
->
etype
])
goto
ret
;
if
(
l
->
type
->
etype
==
TUINTPTR
)
goto
ret
;
}
// convert from unsafe.pointer
if
(
isptrto
(
l
->
type
,
TANY
))
{
if
(
isptr
[
n
->
type
->
etype
])
goto
ret
;
if
(
n
->
type
->
etype
==
TUINTPTR
)
goto
ret
;
}
if
(
l
->
type
!=
T
)
yyerror
(
"cannot convert %T to %T"
,
l
->
type
,
t
);
goto
ret
;
...
...
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