mirror of https://github.com/golang/go.git
gc: permit unsafe.Pointer for inlined functions.
R=rsc, rsc CC=golang-dev https://golang.org/cl/5573075
This commit is contained in:
parent
b62a5099e4
commit
2332439b1b
|
|
@ -1149,7 +1149,7 @@ assignop(Type *src, Type *dst, char **why)
|
|||
if(why != nil)
|
||||
*why = "";
|
||||
|
||||
if(safemode && src != T && src->etype == TUNSAFEPTR) {
|
||||
if(safemode && (importpkg == nil || importpkg == localpkg) && src != T && src->etype == TUNSAFEPTR) {
|
||||
yyerror("cannot use unsafe.Pointer");
|
||||
errorexit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue