Exemplo n.º 1
0
static bool
ifaceeq1(void *data1, void *data2, Type *t)
{
	uintptr size;
	Alg *alg;
	Eface err;
	bool eq;

	alg = t->alg;
	size = t->size;

	if(alg->equal == runtime·noequal) {
		// calling noequal will panic too,
		// but we can print a better error.
		runtime·newErrorString(runtime·catstring(runtime·gostringnocopy((byte*)"comparing uncomparable type "), *t->string), &err);
		runtime·panic(err);
	}

	eq = 0;
	if(size <= sizeof(data1))
		alg->equal(&eq, size, &data1, &data2);
	else
		alg->equal(&eq, size, data1, data2);
	return eq;
}
Exemplo n.º 2
0
static bool 
ifaceeq1 ( void *data1 , void *data2 , Type *t ) 
{ 
uintptr size; 
Alg *alg; 
Eface err; 
bool eq; 
#line 504 "/home/pi/go_build/hg/go/src/pkg/runtime/iface.goc"
alg = t->alg; 
size = t->size; 
#line 507 "/home/pi/go_build/hg/go/src/pkg/runtime/iface.goc"
if ( alg->equal == runtime·noequal ) { 
#line 510 "/home/pi/go_build/hg/go/src/pkg/runtime/iface.goc"
runtime·newErrorString ( runtime·catstring ( runtime·gostringnocopy ( ( byte* ) "comparing uncomparable type " ) , *t->string ) , &err ) ; 
runtime·panic ( err ) ; 
} 
#line 514 "/home/pi/go_build/hg/go/src/pkg/runtime/iface.goc"
eq = 0; 
if ( size <= sizeof ( data1 ) ) 
alg->equal ( &eq , size , &data1 , &data2 ) ; 
else 
alg->equal ( &eq , size , data1 , data2 ) ; 
return eq; 
} 
Exemplo n.º 3
0
static bool 
ifaceeq1 ( void *data1 , void *data2 , Type *t ) 
{ 
uintptr size; 
Alg *alg; 
Eface err; 
bool eq; 
#line 533 "/tmp/makerelease197226928/go/src/pkg/runtime/iface.goc"
alg = t->alg; 
size = t->size; 
#line 536 "/tmp/makerelease197226928/go/src/pkg/runtime/iface.goc"
if ( alg->equal == runtime·noequal ) { 
#line 539 "/tmp/makerelease197226928/go/src/pkg/runtime/iface.goc"
runtime·newErrorString ( runtime·catstring ( runtime·gostringnocopy ( ( byte* ) "comparing uncomparable type " ) , *t->string ) , &err ) ; 
runtime·panic ( err ) ; 
} 
#line 543 "/tmp/makerelease197226928/go/src/pkg/runtime/iface.goc"
eq = 0; 
if ( size <= sizeof ( data1 ) ) 
alg->equal ( &eq , size , &data1 , &data2 ) ; 
else 
alg->equal ( &eq , size , data1 , data2 ) ; 
return eq; 
}