summaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-05-08 14:57:56 -0700
committerRob Pike <r@golang.org>2009-05-08 14:57:56 -0700
commit206ea17d5fe6ad6d6492afe73ec2d72ce399a3fd (patch)
treed54cd6662a717e4850d205fbee0b5af590e5fb35 /src/runtime
parent51212c547f7990a3bf2df877342b8118478fef4d (diff)
downloadgolang-206ea17d5fe6ad6d6492afe73ec2d72ce399a3fd.tar.gz
Move sys.Reflect and sys.Unreflect into unsafe.
R=rsc DELTA=19 (4 added, 5 deleted, 10 changed) OCL=28563 CL=28566
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/iface.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/iface.c b/src/runtime/iface.c
index e5de5d16d..cad7370c5 100644
--- a/src/runtime/iface.c
+++ b/src/runtime/iface.c
@@ -560,7 +560,7 @@ sys·printinter(Iface i)
}
void
-sys·Reflect(Iface i, uint64 retit, String rettype, bool retindir)
+unsafe·Reflect(Iface i, uint64 retit, String rettype, bool retindir)
{
int32 wid;
@@ -602,7 +602,7 @@ extern int32 ngotypesigs;
// on the fake signature are:
//
// (1) any interface conversion using the signature will fail
-// (2) calling sys.Reflect() returns the args to unreflect
+// (2) calling unsafe.Reflect() returns the args to unreflect
// (3) the right algorithm type is used, for == and map insertion
//
// (1) is ensured by the fact that we allocate a new Sigt,
@@ -757,7 +757,7 @@ findtype(String type, bool indir)
void
-sys·Unreflect(uint64 it, String type, bool indir, Iface ret)
+unsafe·Unreflect(uint64 it, String type, bool indir, Iface ret)
{
Sigt *sigt;
@@ -767,8 +767,8 @@ sys·Unreflect(uint64 it, String type, bool indir, Iface ret)
goto out;
if(type.len > 10 && mcmp(type.str, (byte*)"interface ", 10) == 0) {
- printf("sys.Unreflect: cannot put %S in interface\n", type);
- throw("sys.Unreflect");
+ printf("unsafe.Unreflect: cannot put %S in interface\n", type);
+ throw("unsafe.Unreflect");
}
// if we think the type should be indirect