mirror of
https://github.com/golang/go
synced 2024-11-26 05:57:58 -07:00
handle zeroed interface in ifaceI2I
R=r OCL=16938 CL=16938
This commit is contained in:
parent
32d00e6cc6
commit
900e076d21
@ -231,7 +231,6 @@ sys·ifaceI2T(Sigt *st, Map *im, void *it, void *ret)
|
||||
void
|
||||
sys·ifaceI2I(Sigi *si, Map *im, void *it, Map *retim, void *retit)
|
||||
{
|
||||
|
||||
if(debug) {
|
||||
prints("I2I sigi=");
|
||||
printsigi(si);
|
||||
@ -241,15 +240,17 @@ sys·ifaceI2I(Sigi *si, Map *im, void *it, Map *retim, void *retit)
|
||||
}
|
||||
|
||||
if(im == nil) {
|
||||
throw("ifaceI2I: nil map");
|
||||
return;
|
||||
// If incoming interface is uninitialized (zeroed)
|
||||
// make the outgoing interface zeroed as well.
|
||||
retim = nil;
|
||||
retit = nil;
|
||||
} else {
|
||||
retit = it;
|
||||
retim = im;
|
||||
if(im->sigi != si)
|
||||
retim = hashmap(si, im->sigt);
|
||||
}
|
||||
|
||||
retit = it;
|
||||
retim = im;
|
||||
if(im->sigi != si)
|
||||
retim = hashmap(si, im->sigt);
|
||||
|
||||
if(debug) {
|
||||
prints("I2I ret=");
|
||||
printiface(retim, retit);
|
||||
|
Loading…
Reference in New Issue
Block a user