From 5da74960c25293a2384fabd1f171429b0c68ca8d Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Mon, 30 Aug 2004 12:33:09 +0000 Subject: [PATCH] * libltdl/lt_dlloader.c (lt_dlloader_remove): Since the return value of this function is often passed to free, don't declare it `const'. Responsibility for this memory is given back to the caller on return. * libltdl/lt_dlloader.h (lt_dlloader_remove): Ditto. * libltdl/ltdl.c (lt_dlexit): Adjust. * NEWS: Updated. --- ChangeLog | 10 ++++++++++ NEWS | 2 +- libltdl/lt_dlloader.c | 2 +- libltdl/lt_dlloader.h | 2 +- libltdl/ltdl.c | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8fe24f11c..9e329945d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-08-30 Gary V. Vaughan + + * libltdl/lt_dlloader.c (lt_dlloader_remove): Since the return + value of this function is often passed to free, don't declare it + `const'. Responsibility for this memory is given back to the + caller on return. + * libltdl/lt_dlloader.h (lt_dlloader_remove): Ditto. + * libltdl/ltdl.c (lt_dlexit): Adjust. + * NEWS: Updated. + 2004-08-30 Andreas Schwab * libltdl/ltdl.c (lt_dlexit): Remove lvalue cast. diff --git a/NEWS b/NEWS index bcda7126c..343a23d1c 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool New in 1.9d: 2004-??-??; CVS version 1.9c, Libtool team: -* ??? +* Return type of lt_dlloader_remove is no longer `const'. New in 1.9b: 2004-08-29; CVS version 1.5a, Libtool team: * The /^_?LT_[A-Z_]+$/ namespace is now reserved for Libtool's own macros. diff --git a/libltdl/lt_dlloader.c b/libltdl/lt_dlloader.c index 714eb4ce8..8487747c1 100644 --- a/libltdl/lt_dlloader.c +++ b/libltdl/lt_dlloader.c @@ -109,7 +109,7 @@ lt_dlloader_get (lt_dlloader loader) was no match, return NULL; if there is an error, return NULL and set an error for lt_dlerror; in either case the loader list is not changed. */ -const lt_dlvtable * +lt_dlvtable * lt_dlloader_remove (const char *name) { const lt_dlvtable * vtable = lt_dlloader_find (name); diff --git a/libltdl/lt_dlloader.h b/libltdl/lt_dlloader.h index c65df3876..6bf66b7cf 100644 --- a/libltdl/lt_dlloader.h +++ b/libltdl/lt_dlloader.h @@ -70,7 +70,7 @@ typedef struct { LT_SCOPE int lt_dlloader_add (const lt_dlvtable *vtable); LT_SCOPE lt_dlloader lt_dlloader_next (const lt_dlloader loader); -LT_SCOPE const lt_dlvtable *lt_dlloader_remove (const char *name); +LT_SCOPE lt_dlvtable * lt_dlloader_remove (const char *name); LT_SCOPE const lt_dlvtable *lt_dlloader_find (const char *name); LT_SCOPE const lt_dlvtable *lt_dlloader_get (lt_dlloader loader); diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index f25333186..25fe418aa 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -290,7 +290,7 @@ lt_dlexit (void) /* close all loaders */ while (loader = lt_dlloader_next (loader)) { - const lt_dlvtable *vtable = lt_dlloader_get (loader); + lt_dlvtable *vtable = (lt_dlvtable *) lt_dlloader_get (loader); if ((vtable = lt_dlloader_remove (vtable->name))) { -- 2.47.2