Initialize allocated functors (Stephan Boettcher)
This commit is contained in:
parent
c3ae00ae49
commit
0e20be774e
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: functor.cc,v 1.23 2001/06/21 22:54:12 steve Exp $"
|
#ident "$Id: functor.cc,v 1.24 2001/07/16 18:06:01 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "functor.h"
|
# include "functor.h"
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
# include "vpi_priv.h"
|
# include "vpi_priv.h"
|
||||||
# include "debug.h"
|
# include "debug.h"
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
|
# include <string.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Functors are created as the source design is read in. Each is
|
* Functors are created as the source design is read in. Each is
|
||||||
|
|
@ -89,11 +90,16 @@ static vvp_ipoint_t functor_allocate_(void)
|
||||||
|
|
||||||
assert( idx < functor_index2_size);
|
assert( idx < functor_index2_size);
|
||||||
|
|
||||||
if (functor_table[idx] == 0)
|
if (functor_table[idx] == 0) {
|
||||||
functor_table[idx] = new struct functor_index1;
|
functor_table[idx] = new struct functor_index1;
|
||||||
|
memset(functor_table[idx], 0, sizeof(struct functor_index1));
|
||||||
|
}
|
||||||
|
|
||||||
if (functor_table[idx]->table[index1] == 0)
|
if (functor_table[idx]->table[index1] == 0) {
|
||||||
functor_table[idx]->table[index1] = new struct functor_index0;
|
functor_table[idx]->table[index1] = new struct functor_index0;
|
||||||
|
memset(functor_table[idx]->table[index1],
|
||||||
|
0, sizeof(struct functor_index0));
|
||||||
|
}
|
||||||
|
|
||||||
vvp_ipoint_t res = functor_count;
|
vvp_ipoint_t res = functor_count;
|
||||||
functor_count += 1;
|
functor_count += 1;
|
||||||
|
|
@ -365,6 +371,9 @@ const unsigned char ft_var[16] = {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: functor.cc,v $
|
* $Log: functor.cc,v $
|
||||||
|
* Revision 1.24 2001/07/16 18:06:01 steve
|
||||||
|
* Initialize allocated functors (Stephan Boettcher)
|
||||||
|
*
|
||||||
* Revision 1.23 2001/06/21 22:54:12 steve
|
* Revision 1.23 2001/06/21 22:54:12 steve
|
||||||
* Support cbValueChange callbacks.
|
* Support cbValueChange callbacks.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue