Created too mane vvp_net_t objects?

The functor_ref_lookup() function fills its argument in with the
vvp_net_t* pointer that matches the var name, so there is no need
to create the vvp_net_t object before then.
This commit is contained in:
Stephen Williams 2008-06-14 15:31:48 -07:00
parent 1530594b4b
commit f497dbf01e
1 changed files with 3 additions and 3 deletions

View File

@ -1164,7 +1164,7 @@ vpiHandle vpip_make_PV(char*var, int base, int width)
obj->tbase = base;
obj->twid = 0;
obj->width = (unsigned) width;
obj->net = (vvp_net_t*) malloc(sizeof(vvp_net_t));
obj->net = 0;
functor_ref_lookup(&obj->net, var);
return &obj->base;
@ -1179,7 +1179,7 @@ vpiHandle vpip_make_PV(char*var, char*symbol, int width)
obj->tbase = 0;
obj->twid = 0;
obj->width = (unsigned) width;
obj->net = (vvp_net_t*) malloc(sizeof(vvp_net_t));
obj->net = 0;
functor_ref_lookup(&obj->net, var);
return &obj->base;
@ -1194,7 +1194,7 @@ vpiHandle vpip_make_PV(char*var, int tbase, int twid, int width)
obj->tbase = tbase;
obj->twid = (unsigned) twid;
obj->width = (unsigned) width;
obj->net = (vvp_net_t*) malloc(sizeof(vvp_net_t));
obj->net = 0;
functor_ref_lookup(&obj->net, var);
return &obj->base;