Commit 2332439b authored by David Symonds's avatar David Symonds

gc: permit unsafe.Pointer for inlined functions.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5573075
parent b62a5099
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment