diff --git a/ChangeLog b/ChangeLog index 8fe24f11..9e329945 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 bcda7126..343a23d1 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 714eb4ce..8487747c 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 c65df387..6bf66b7c 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 f2533318..25fe418a 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))) {