diff libinterp/octave-value/ov-fcn-handle.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 34d06c73b48d
children 939bef0b66e0
line wrap: on
line diff
--- a/libinterp/octave-value/ov-fcn-handle.h	Sat Aug 14 10:40:21 2021 -0400
+++ b/libinterp/octave-value/ov-fcn-handle.h	Sat Aug 14 11:13:17 2021 -0400
@@ -374,9 +374,11 @@
 
 namespace octave
 {
+#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
   OCTAVE_DEPRECATED (6, "use 'tree_evaluator::make_fcn_handle' instead")
   extern octave_value
   make_fcn_handle (interpreter& interp, const std::string& name);
+#endif
 }
 
 #endif