Mercurial > octave
changeset 30338:4b31fe078a5e stable
avoid declaring mark_for_deletion and cleanup_tmp_files in octave namspace
These symbols weren't part of Octave 6 and should never have been
declared in the octave namespace or exported when the corresponding
global function names were deprecated.
* file-io.h, file-io.cc (octave::mark_for_deletion_deprecated): Rename
from octave::mark_for_deletion. Don't export symbol.
(octave::cleanup_tmp_files_deprecated): Rename from
octave::cleanup_tmp_files. Don't export symbol.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 24 Nov 2021 10:56:24 -0500 |
parents | 8f8fab4c93ae |
children | 2e733d9ce10e |
files | libinterp/corefcn/file-io.cc libinterp/corefcn/file-io.h |
diffstat | 2 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc Wed Nov 24 07:22:10 2021 -0500 +++ b/libinterp/corefcn/file-io.cc Wed Nov 24 10:56:24 2021 -0500 @@ -3255,9 +3255,8 @@ // Deprecated variables and functions. -// Deprecated in Octave 6. -void -mark_for_deletion (const std::string& file) +// Remove when corresponding global deprecated function is removed. +void mark_for_deletion_deprecated (const std::string& file) { octave::interpreter& interp = octave::__get_interpreter__ ("mark_for_deletion"); @@ -3265,9 +3264,8 @@ interp.mark_for_deletion (file); } -// Deprecated in Octave 6. -void -cleanup_tmp_files (void) +// Remove when corresponding global deprecated function is removed. +void cleanup_tmp_files_deprecated (void) { octave::interpreter& interp = octave::__get_interpreter__ ("cleanup_tmp_files");
--- a/libinterp/corefcn/file-io.h Wed Nov 24 07:22:10 2021 -0500 +++ b/libinterp/corefcn/file-io.h Wed Nov 24 10:56:24 2021 -0500 @@ -34,9 +34,15 @@ OCTAVE_NAMESPACE_BEGIN -extern OCTINTERP_API void mark_for_deletion (const std::string&); +// Use this function internally until the function that uses it is +// removed. Remove when corresponding global deprecated function is +// removed. +extern void mark_for_deletion_deprecated (const std::string&); -extern OCTINTERP_API void cleanup_tmp_files (void); +// Use this function internally until the function that uses it is +// removed. Remove when corresponding global deprecated function is +// removed. +extern void cleanup_tmp_files_deprecated (void); OCTAVE_NAMESPACE_END @@ -45,13 +51,13 @@ OCTAVE_DEPRECATED (6, "use 'interpreter::mark_for_deletion' instead") inline void mark_for_deletion (const std::string& fname) { - octave::mark_for_deletion (fname); + octave::mark_for_deletion_deprecated (fname); } OCTAVE_DEPRECATED (6, "use 'interpreter::cleanup_tmp_files' instead") inline void cleanup_tmp_files (void) { - octave::cleanup_tmp_files (); + octave::cleanup_tmp_files_deprecated (); } #endif