aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/iface.c')
-rw-r--r--src/pkg/runtime/iface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/runtime/iface.c b/src/pkg/runtime/iface.c
index 2b60c4f23a..b7eb2c18d1 100644
--- a/src/pkg/runtime/iface.c
+++ b/src/pkg/runtime/iface.c
@@ -193,7 +193,7 @@ runtime·convT2I(Type *t, InterfaceType *inter, ...)
elem = (byte*)(&inter+1);
wid = t->size;
- ret = (Iface*)(elem + runtime·rnd(wid, Structrnd));
+ ret = (Iface*)(elem + ROUND(wid, Structrnd));
ret->tab = itab(inter, t, 0);
copyin(t, elem, &ret->data);
}
@@ -209,7 +209,7 @@ runtime·convT2E(Type *t, ...)
elem = (byte*)(&t+1);
wid = t->size;
- ret = (Eface*)(elem + runtime·rnd(wid, Structrnd));
+ ret = (Eface*)(elem + ROUND(wid, Structrnd));
ret->type = t;
copyin(t, elem, &ret->data);
}
@@ -387,7 +387,7 @@ void
runtime·convI2I(InterfaceType* inter, Iface i, Iface ret)
{
Itab *tab;
-
+
ret.data = i.data;
if((tab = i.tab) == nil)
ret.tab = nil;
@@ -694,7 +694,7 @@ reflect·unsafe_NewArray(Eface typ, uint32 n, void *ret)
// We know that the pointer to the original
// type structure sits before the data pointer.
t = (Type*)((Eface*)typ.data-1);
-
+
size = n*t->size;
if(t->kind&KindNoPointers)
ret = runtime·mallocgc(size, FlagNoPointers, 1, 1);