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
bf616471
Commit
bf616471
authored
Dec 08, 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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
src/cmd/gc/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:
...
@@ -622,6 +622,22 @@ loop:
goto
ret
;
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
)
if
(
l
->
type
!=
T
)
yyerror
(
"cannot convert %T to %T"
,
l
->
type
,
t
);
yyerror
(
"cannot convert %T to %T"
,
l
->
type
,
t
);
goto
ret
;
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