Mercurial > octave
diff libinterp/parse-tree/bp-table.h @ 29954:4c88a452519c
rename OCTAVE_USE_DEPRECATED_FUNCTIONS macro and attempt to make it work
For ordinary functions declared in a header file and defined in a
corresponding source file, it should be OK to omit the declaration in
the header file based on the value of
OCTAVE_PROVIDE_DEPRECATED_SYMBOLS. But it is an error to attempt to
define a member function that has not been declared in the class
declaration. So for these, we rename the original function to be
FOO_deprecated and then provide a wrapper function called FOO that is
completely defined in the header file and simply calls the
FOO_deprecated function.
* mk-octave-config-h.sh, oct-conf-post.in.h
(OCTAVE_PROVIDE_DEPRECATED_SYMBOLS): Rename from
OCTAVE_USE_DEPRECATED_FUNCTIONS. Change all uses. For deprecated
member fucntions, use private FOO_deprecated member functions and
conditionally defined inline public wrappers to allow declarations of
deprecated symbosl to be omitted if OCTAVE_PROVIDE_DEPRECATED_SYMBOLS
is not defined.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 14 Aug 2021 11:13:17 -0400 |
parents | c0f86150aa6c |
children | 14b098a6ba46 |
line wrap: on
line diff
--- a/libinterp/parse-tree/bp-table.h Sat Aug 14 10:40:21 2021 -0400 +++ b/libinterp/parse-tree/bp-table.h Sat Aug 14 11:13:17 2021 -0400 @@ -76,6 +76,7 @@ typedef fname_bp_map::const_iterator const_fname_bp_map_iterator; typedef fname_bp_map::iterator fname_bp_map_iterator; +#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) OCTAVE_DEPRECATED (7, "use 'bp_table::add_breakpoints_in_function' instead") int add_breakpoint (const std::string& fname = "", const std::string& class_name = "", @@ -93,6 +94,7 @@ { return add_breakpoints_in_function (fname, class_name, lines, condition); } +#endif // Add a breakpoint at the nearest executable line in a function. int add_breakpoint_in_function (const std::string& fname = "", @@ -118,6 +120,7 @@ const bp_lines& lines = bp_lines (), const std::string& condition = ""); +#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) OCTAVE_DEPRECATED (7, "use 'bp_table::remove_breakpoint_from_function' instead") int remove_breakpoint (const std::string& fname = "", int line = 1) @@ -131,6 +134,7 @@ { return remove_breakpoints_from_function (fname, lines); } +#endif // Remove a breakpoint from the given line in file. int remove_breakpoint_from_function (const std::string& fname = "", @@ -153,12 +157,14 @@ const bp_lines& lines = bp_lines ()); +#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) OCTAVE_DEPRECATED (7, "use 'bp_table::remove_all_breakpoints_from_function' instead") bp_lines remove_all_breakpoints_in_file (const std::string& fname, bool silent = false) { return remove_all_breakpoints_from_function (fname, silent); } +#endif // Remove all the breakpoints from a file. bp_lines remove_all_breakpoints_from_file (const std::string& file,