Description: testsuite/vpi: fix callback types
Author: Tristan Gingold <tgingold@free.fr>
Origin: upstream, https://github.com/ghdl/ghdl/commit/659a5d7a018d011aad23235bfd3e306072436a8b
Last-Update: 2024-07-29
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
diff --git a/testsuite/vpi/vpi001/vpi1.c b/testsuite/vpi/vpi001/vpi1.c
index c266b5cd7..a1ff9fb5d 100644
--- a/testsuite/vpi/vpi001/vpi1.c
+++ b/testsuite/vpi/vpi001/vpi1.c
@@ -2,8 +2,8 @@
 #include <vpi_user.h>
 #define N_NAMES 12
 
-void
-vpi_proc (void)
+PLI_INT32
+vpi_proc (s_cb_data *cb)
 {
   vpiHandle net;
   s_vpi_value val;
@@ -39,12 +39,13 @@ vpi_proc (void)
     if (net == NULL)
         {
         printf ("Error: Failed to find the net %s\n", names[name_index]);
-        return;
+        return -1;
         }
     val.format = vpiBinStrVal;
     vpi_get_value (net, &val);
     printf ("value: %s\n", val.value.str);
   }
+  return 0;
 }
 
 void my_handle_register()
diff --git a/testsuite/vpi/vpi003/vpi1.c b/testsuite/vpi/vpi003/vpi1.c
index d7a6f8241..8bd18873d 100644
--- a/testsuite/vpi/vpi003/vpi1.c
+++ b/testsuite/vpi/vpi003/vpi1.c
@@ -2,8 +2,8 @@
 #include <vpi_user.h>
 #define N_NAMES 0
 
-void
-vpi_proc (void)
+PLI_INT32
+vpi_proc (s_cb_data *cb)
 {
   vpiHandle net;
   s_vpi_value val;
@@ -29,12 +29,13 @@ vpi_proc (void)
     if (net == NULL)
         {
         printf ("Error: Failed to find the net %s\n", names[name_index]);
-        return;
+        return -1;
         }
     val.format = vpiBinStrVal;
     vpi_get_value (net, &val);
     printf ("value: %s\n", val.value.str);
   }
+  return 0;
 }
 
 void my_handle_register()
