Mercurial > hg > octave-avbm
changeset 10287:7c7685cc0676
fix reload warning for dynamically linked functions
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 09 Feb 2010 17:44:22 -0500 |
parents | 8cf666139297 |
children | 5e972e2deffe |
files | src/ChangeLog src/dynamic-ld.cc |
diffstat | 2 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-02-09 John W. Eaton <jwe@octave.org> + + * dynamic-ld.cc (clear): Only warn if reloading a dynamically + linked file that defines multiple functions. + 2010-02-09 Jaroslav Hajek <highegg@gmail.com> * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx (const Array<T>&, ...)):
--- a/src/dynamic-ld.cc +++ b/src/dynamic-ld.cc @@ -308,8 +308,8 @@ return retval; } -static -void do_clear_function (const std::string& fcn_name) +static void +do_clear_function (const std::string& fcn_name) { warning_with_id ("Octave:reload-forces-clear", " %s", fcn_name.c_str ()); @@ -320,11 +320,15 @@ clear (octave_shlib& oct_file) { if (oct_file.number_of_functions_loaded () > 1) - warning_with_id ("Octave:reload-forces-clear", - "reloading %s clears the following functions:", - oct_file.file_name().c_str ()); + { + warning_with_id ("Octave:reload-forces-clear", + "reloading %s clears the following functions:", + oct_file.file_name().c_str ()); - octave_shlib_list::remove (oct_file, do_clear_function); + octave_shlib_list::remove (oct_file, do_clear_function); + } + else + octave_shlib_list::remove (oct_file, symbol_table::clear_dld_function); } octave_function *