diff --git a/vvp/array.cc b/vvp/array.cc index 7c68ce821..2ce2728d0 100644 --- a/vvp/array.cc +++ b/vvp/array.cc @@ -97,6 +97,7 @@ struct __vpiArray : public __vpiArrayBase, public __vpiHandle { int vpi_get(int code); char* vpi_get_str(int code); vpiHandle vpi_handle(int code); + inline vpiHandle vpi_iterate(int code) { return vpi_array_base_iterate(code); } vpiHandle vpi_index(int idx); const char*name; /* Permanently allocated string */ diff --git a/vvp/array_common.cc b/vvp/array_common.cc index 08bb11ab9..668a61542 100644 --- a/vvp/array_common.cc +++ b/vvp/array_common.cc @@ -21,7 +21,7 @@ #include "array_common.h" -vpiHandle __vpiArrayBase::vpi_iterate(int code) +vpiHandle __vpiArrayBase::vpi_array_base_iterate(int code) { switch (code) { case vpiMemoryWord: { diff --git a/vvp/vpi_priv.h b/vvp/vpi_priv.h index 15efe0db8..ecf2f0c22 100644 --- a/vvp/vpi_priv.h +++ b/vvp/vpi_priv.h @@ -548,8 +548,10 @@ struct __vpiArrayBase { virtual void get_word_value(struct __vpiArrayWord*word, p_vpi_value vp) = 0; virtual void put_word_value(struct __vpiArrayWord*word, p_vpi_value vp, int flags) = 0; - - virtual vpiHandle vpi_iterate(int code); + // vpi_iterate is already defined by vpiHandle, so to avoid problems with + // classes inheriting from vpiHandle and vpiArrayBase just share the common + // code in the following function + vpiHandle vpi_array_base_iterate(int code); virtual void make_vals_words(); struct __vpiArrayWord*vals_words;