Mercurial > hg > octave-nkf
diff src/symtab.h @ 9958:80432f0ee895
improve octave_shlib for safer shared libs treatment
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 10 Dec 2009 09:14:47 +0100 |
parents | 8d79f36ebdde |
children | 692ab4eaf965 |
line wrap: on
line diff
--- a/src/symtab.h +++ b/src/symtab.h @@ -847,6 +847,8 @@ void clear_user_function (void) { rep->clear_user_function (); } + void clear_autoload_function (void) { rep->clear_autoload_function (); } + void clear_mex_function (void) { rep->clear_mex_function (); } void add_dispatch (const std::string& type, const std::string& fname) @@ -1392,6 +1394,20 @@ // error ("clear: no such function `%s'", name.c_str ()); } + // This clears oct and mex files, incl. autoloads. + static void clear_dld_function (const std::string& name) + { + fcn_table_iterator p = fcn_table.find (name); + + if (p != fcn_table.end ()) + { + fcn_info& finfo = p->second; + + finfo.clear_autoload_function (); + finfo.clear_user_function (); + } + } + static void clear_mex_functions (void) { for (fcn_table_iterator p = fcn_table.begin (); p != fcn_table.end (); p++)