Fix build errors when configured --with-valgrind

The vpi_callback base class is parent of the filter object of nets,
and not the functor. The good news is the clear_all_callbacks method
can now be got at without casts.
This commit is contained in:
Stephen Williams 2009-09-24 15:11:56 -07:00
parent b8b70f5ac7
commit 8a3df7c4ff
2 changed files with 6 additions and 9 deletions

View File

@ -196,9 +196,8 @@ vpiHandle vpip_make_real_var(const char*name, vvp_net_t*net)
void real_delete(vpiHandle item)
{
struct __vpiRealVar*obj = (struct __vpiRealVar*) item;
vvp_fun_signal_real*fun = (vvp_fun_signal_real*) obj->net->fun;
fun->clear_all_callbacks();
assert(obj->net->fil);
obj->net->fil->clear_all_callbacks();
free(obj);
}

View File

@ -939,9 +939,8 @@ static struct __vpiSignal* allocate_vpiSignal(void)
void signal_delete(vpiHandle item)
{
struct __vpiSignal *obj = (__vpiSignal *) item;
vvp_fun_signal_base*sig_fun;
sig_fun = (vvp_fun_signal_base*) obj->node->fun;
sig_fun->clear_all_callbacks();
assert(obj->node->fil);
obj->node->fil->clear_all_callbacks();
vvp_net_delete(obj->node);
VALGRIND_MEMPOOL_FREE(obj->pool, obj);
}
@ -1343,9 +1342,8 @@ void PV_delete(vpiHandle item)
break;
}
}
vvp_fun_signal_base*sig_fun;
sig_fun = (vvp_fun_signal_base*) obj->net->fun;
sig_fun->clear_all_callbacks();
assert(obj->net->fil);
obj->net->fil->clear_all_callbacks();
free(obj);
}
#endif