Mercurial > octave
changeset 29999:04f9a4be7d79
move deprecated file-io.cc functions inside octave namespace
* (mark_for_deletion, cleanup_tmp_files): Move actual function
definitions inside octave namespace. Provide inline deprecated
wrapper functions to preserve old names.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 18 Aug 2021 09:11:15 -0400 |
parents | 8d86806fcdfd |
children | 362029cc0202 |
files | libinterp/corefcn/file-io.cc libinterp/corefcn/file-io.h |
diffstat | 2 files changed, 20 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc Wed Aug 18 09:06:09 2021 -0400 +++ b/libinterp/corefcn/file-io.cc Wed Aug 18 09:11:15 2021 -0400 @@ -3252,8 +3252,6 @@ return const_value ("stderr", args, streams.stderr_file ()); } -OCTAVE_NAMESPACE_END - // Deprecated variables and functions. // Deprecated in Octave 6. @@ -3276,3 +3274,4 @@ interp.cleanup_tmp_files (); } +OCTAVE_NAMESPACE_END
--- a/libinterp/corefcn/file-io.h Wed Aug 18 09:06:09 2021 -0400 +++ b/libinterp/corefcn/file-io.h Wed Aug 18 09:11:15 2021 -0400 @@ -32,12 +32,28 @@ #include <string> -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) -OCTAVE_DEPRECATED (6, "use 'interpreter::mark_for_deletion' instead") +OCTAVE_NAMESPACE_BEGIN + extern OCTINTERP_API void mark_for_deletion (const std::string&); +extern OCTINTERP_API void cleanup_tmp_files (void); + +OCTAVE_NAMESPACE_END + +#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) + +OCTAVE_DEPRECATED (6, "use 'interpreter::mark_for_deletion' instead") +inline void mark_for_deletion (const std::string& fname) +{ + octave::mark_for_deletion (fname); +} + OCTAVE_DEPRECATED (6, "use 'interpreter::cleanup_tmp_files' instead") -extern OCTINTERP_API void cleanup_tmp_files (void); +inline void cleanup_tmp_files (void) +{ + octave::cleanup_tmp_files (); +} + #endif #endif