Add correct C++ cast for the vpi_modules
This commit is contained in:
parent
b7292e0179
commit
702189a948
|
|
@ -253,7 +253,7 @@ bool load_vpi_module(const char*path)
|
|||
ivl_dlclose(dll);
|
||||
return true;
|
||||
}
|
||||
vpip_set_callback_t set_callback = (vpip_set_callback_t)function;
|
||||
vpip_set_callback_t set_callback = reinterpret_cast<vpip_set_callback_t>(function);
|
||||
if (!set_callback(&vpi_routines, vpip_routines_version)) {
|
||||
cerr << "error: Failed to link '" << path << "'. "
|
||||
"Try rebuilding it with iverilog-vpi." << endl;
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ void vpip_load_module(const char*name)
|
|||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
void*function = ivl_dlsym(dll, "vpip_set_callback");
|
||||
if (function) {
|
||||
vpip_set_callback_t set_callback = (vpip_set_callback_t)function;
|
||||
vpip_set_callback_t set_callback = reinterpret_cast<vpip_set_callback_t>(function);
|
||||
if (!set_callback(&vpi_routines, vpip_routines_version)) {
|
||||
fprintf(stderr, "Failed to link VPI module %s. Try rebuilding it with iverilog-vpi.\n", name);
|
||||
ivl_dlclose(dll);
|
||||
|
|
|
|||
Loading…
Reference in New Issue