Mercurial > hg > octave-terminal
changeset 6063:8010902404b9
[project @ 2006-10-19 01:27:35 by jwe]
author | jwe |
---|---|
date | Thu, 19 Oct 2006 01:27:35 +0000 |
parents | a813714cb04b |
children | fede829d805a |
files | src/ChangeLog src/dynamic-ld.cc |
diffstat | 2 files changed, 25 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2006-10-18 John W. Eaton <jwe@octave.org> + * dynamic-ld.cc (octave_shlib_list::remove, + octave_shlib_list::do_remove, octave_mex_file_list::remove, + octave_mex_file_list::do_remove): New arg, cl_hook. + (octave_shlib_list::do_remove): Pass cl_hook to octave_shlib close + function. + (octave_dynamic_loader::do_load_oct): Don't call close on shl + directly. Pass do_clear_function to octave_shlib_list::remove. + * mex.cc (mexUnlock): Don't warn if unlocking a function that is not locked.
--- a/src/dynamic-ld.cc +++ b/src/dynamic-ld.cc @@ -49,7 +49,7 @@ static void append (const octave_shlib& shl); - static void remove (octave_shlib& shl); + static void remove (octave_shlib& shl, octave_shlib::close_hook cl_hook = 0); static void *search (const std::string& fcn_name, octave_shlib& shl, octave_shlib::name_mangler mangler = 0); @@ -62,7 +62,7 @@ void do_append (const octave_shlib& shl); - void do_remove (octave_shlib& shl); + void do_remove (octave_shlib& shl, octave_shlib::close_hook cl_hook = 0); void *do_search (const std::string& fcn_name, octave_shlib& shl, octave_shlib::name_mangler mangler = 0); @@ -90,16 +90,16 @@ } void -octave_shlib_list::do_remove (octave_shlib& shl) +octave_shlib_list::do_remove (octave_shlib& shl, + octave_shlib::close_hook cl_hook) { - for (std::list<octave_shlib>::iterator p = lib_list.begin (); p != lib_list.end (); p++) { if (*p == shl) { - shl.close (); + shl.close (cl_hook); lib_list.erase (p); @@ -159,10 +159,11 @@ } void -octave_shlib_list::remove (octave_shlib& shl) +octave_shlib_list::remove (octave_shlib& shl, + octave_shlib::close_hook cl_hook) { if (instance_ok ()) - instance->do_remove (shl); + instance->do_remove (shl, cl_hook); } void * @@ -179,7 +180,7 @@ static void append (const octave_shlib& shl); - static void remove (octave_shlib& shl); + static void remove (octave_shlib& shl, octave_shlib::close_hook cl_hook = 0); private: @@ -189,7 +190,7 @@ void do_append (const octave_shlib& shl); - void do_remove (octave_shlib& shl); + void do_remove (octave_shlib& shl, octave_shlib::close_hook cl_hook = 0); static octave_mex_file_list *instance; @@ -214,7 +215,8 @@ } void -octave_mex_file_list::do_remove (octave_shlib& shl) +octave_mex_file_list::do_remove (octave_shlib& shl, + octave_shlib::close_hook cl_hook) { for (std::list<octave_shlib>::iterator p = file_list.begin (); @@ -223,7 +225,7 @@ { if (*p == shl) { - shl.close (); + shl.close (cl_hook); file_list.erase (p); @@ -258,10 +260,11 @@ } void -octave_mex_file_list::remove (octave_shlib& shl) +octave_mex_file_list::remove (octave_shlib& shl, + octave_shlib::close_hook cl_hook) { if (instance_ok ()) - instance->do_remove (shl); + instance->do_remove (shl, cl_hook); } octave_dynamic_loader *octave_dynamic_loader::instance = 0; @@ -327,7 +330,7 @@ "reloading %s clears the following functions:", oct_file.file_name().c_str ()); - oct_file.close (do_clear_function); + octave_shlib_list::remove (oct_file, do_clear_function); function = 0; }