The lt_dlloader.h API already says these have const return values, and
the main ltdl.c module defines its get_vtable in that way, so update all
of the loaders to match.

* libltdl/loaders/dld_link.c (get_vtable): Add const.
* libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c: Likewise.
---
 libltdl/loaders/dld_link.c    | 4 ++--
 libltdl/loaders/dlopen.c      | 4 ++--
 libltdl/loaders/dyld.c        | 4 ++--
 libltdl/loaders/load_add_on.c | 4 ++--
 libltdl/loaders/loadlibrary.c | 4 ++--
 libltdl/loaders/preopen.c     | 4 ++--
 libltdl/loaders/shl_load.c    | 4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/libltdl/loaders/dld_link.c b/libltdl/loaders/dld_link.c
index 3a9f345e53ae..9dc220d96c07 100644
--- a/libltdl/loaders/dld_link.c
+++ b/libltdl/loaders/dld_link.c
@@ -39,7 +39,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #define get_vtable     dld_link_LTX_get_vtable
 
 LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_SCOPE const lt_dlvtable *get_vtable (lt_user_data loader_data);
 LT_END_C_DECLS
 
 
@@ -57,7 +57,7 @@ static lt_dlvtable *vtable = 0;
 /* Return the vtable for this loader, only the name and sym_prefix
    attributes (plus the virtual function implementations, obviously)
    change between loaders.  */
-lt_dlvtable *
+const lt_dlvtable *
 get_vtable (lt_user_data loader_data)
 {
   if (!vtable)
diff --git a/libltdl/loaders/dlopen.c b/libltdl/loaders/dlopen.c
index 66a129c9a472..5ec46b7f126b 100644
--- a/libltdl/loaders/dlopen.c
+++ b/libltdl/loaders/dlopen.c
@@ -39,7 +39,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #define get_vtable     dlopen_LTX_get_vtable
 
 LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_SCOPE const lt_dlvtable *get_vtable (lt_user_data loader_data);
 LT_END_C_DECLS
 
 
@@ -57,7 +57,7 @@ static lt_dlvtable *vtable = 0;
 /* Return the vtable for this loader, only the name and sym_prefix
    attributes (plus the virtual function implementations, obviously)
    change between loaders.  */
-lt_dlvtable *
+const lt_dlvtable *
 get_vtable (lt_user_data loader_data)
 {
   if (!vtable)
diff --git a/libltdl/loaders/dyld.c b/libltdl/loaders/dyld.c
index 3889b6aa57a0..2c62c6fb0642 100644
--- a/libltdl/loaders/dyld.c
+++ b/libltdl/loaders/dyld.c
@@ -39,7 +39,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #define get_vtable     dyld_LTX_get_vtable
 
 LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_SCOPE const lt_dlvtable *get_vtable (lt_user_data loader_data);
 LT_END_C_DECLS
 
 
@@ -58,7 +58,7 @@ static lt_dlvtable *vtable = 0;
 /* Return the vtable for this loader, only the name and sym_prefix
    attributes (plus the virtual function implementations, obviously)
    change between loaders.  */
-lt_dlvtable *
+const lt_dlvtable *
 get_vtable (lt_user_data loader_data)
 {
   if (!vtable)
diff --git a/libltdl/loaders/load_add_on.c b/libltdl/loaders/load_add_on.c
index 97b4fcb689c0..513daa4c147a 100644
--- a/libltdl/loaders/load_add_on.c
+++ b/libltdl/loaders/load_add_on.c
@@ -39,7 +39,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #define get_vtable     load_add_on_LTX_get_vtable
 
 LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_SCOPE const lt_dlvtable *get_vtable (lt_user_data loader_data);
 LT_END_C_DECLS
 
 
@@ -57,7 +57,7 @@ static lt_dlvtable *vtable = 0;
 /* Return the vtable for this loader, only the name and sym_prefix
    attributes (plus the virtual function implementations, obviously)
    change between loaders.  */
-lt_dlvtable *
+const lt_dlvtable *
 get_vtable (lt_user_data loader_data)
 {
   if (!vtable)
diff --git a/libltdl/loaders/loadlibrary.c b/libltdl/loaders/loadlibrary.c
index 13fd2fb9c72c..10e44490548a 100644
--- a/libltdl/loaders/loadlibrary.c
+++ b/libltdl/loaders/loadlibrary.c
@@ -43,7 +43,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #define get_vtable     loadlibrary_LTX_get_vtable
 
 LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_SCOPE const lt_dlvtable *get_vtable (lt_user_data loader_data);
 LT_END_C_DECLS
 
 
@@ -62,7 +62,7 @@ static lt_dlvtable *vtable = 0;
 /* Return the vtable for this loader, only the name and sym_prefix
    attributes (plus the virtual function implementations, obviously)
    change between loaders.  */
-lt_dlvtable *
+const lt_dlvtable *
 get_vtable (lt_user_data loader_data)
 {
   if (!vtable)
diff --git a/libltdl/loaders/preopen.c b/libltdl/loaders/preopen.c
index f1ed0aa3e306..e5440d3e07ac 100644
--- a/libltdl/loaders/preopen.c
+++ b/libltdl/loaders/preopen.c
@@ -39,7 +39,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #define get_vtable     preopen_LTX_get_vtable
 
 LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_SCOPE const lt_dlvtable *get_vtable (lt_user_data loader_data);
 LT_END_C_DECLS
 
 
@@ -58,7 +58,7 @@ static lt_dlvtable *vtable = 0;
 /* Return the vtable for this loader, only the name and sym_prefix
    attributes (plus the virtual function implementations, obviously)
    change between loaders.  */
-lt_dlvtable *
+const lt_dlvtable *
 get_vtable (lt_user_data loader_data)
 {
   if (!vtable)
diff --git a/libltdl/loaders/shl_load.c b/libltdl/loaders/shl_load.c
index af6adcef0702..cf2e4df91a7a 100644
--- a/libltdl/loaders/shl_load.c
+++ b/libltdl/loaders/shl_load.c
@@ -39,7 +39,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #define get_vtable     shl_load_LTX_get_vtable
 
 LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_SCOPE const lt_dlvtable *get_vtable (lt_user_data loader_data);
 LT_END_C_DECLS
 
 
@@ -57,7 +57,7 @@ static lt_dlvtable *vtable = 0;
 /* Return the vtable for this loader, only the name and sym_prefix
    attributes (plus the virtual function implementations, obviously)
    change between loaders.  */
-lt_dlvtable *
+const lt_dlvtable *
 get_vtable (lt_user_data loader_data)
 {
   if (!vtable)
-- 
2.43.0


Reply via email to