Mercurial > octave
comparison liboctave/util/lo-array-errwarn.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 | 7854d5752dd2 |
children | eff73c13fcf3 796f54d4ddbf |
comparison
equal
deleted
inserted
replaced
29953:e35442c969f5 | 29954:4c88a452519c |
---|---|
129 | 129 |
130 OCTAVE_NORETURN extern OCTAVE_API void | 130 OCTAVE_NORETURN extern OCTAVE_API void |
131 err_index_out_of_range (int ndims, int dim, octave_idx_type idx, | 131 err_index_out_of_range (int ndims, int dim, octave_idx_type idx, |
132 octave_idx_type ext, const dim_vector& dv); | 132 octave_idx_type ext, const dim_vector& dv); |
133 | 133 |
134 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) | |
134 OCTAVE_DEPRECATED (6, "use err_index_out_of_range (int, int, octave_idx_type, octave_idx_type, const dim_vector&) instead") | 135 OCTAVE_DEPRECATED (6, "use err_index_out_of_range (int, int, octave_idx_type, octave_idx_type, const dim_vector&) instead") |
135 OCTAVE_NORETURN extern OCTAVE_API void | 136 OCTAVE_NORETURN extern OCTAVE_API void |
136 err_index_out_of_range (int ndims, int dim, octave_idx_type idx, | 137 err_index_out_of_range (int ndims, int dim, octave_idx_type idx, |
137 octave_idx_type ext); | 138 octave_idx_type ext); |
139 #endif | |
138 | 140 |
139 OCTAVE_NORETURN extern OCTAVE_API void | 141 OCTAVE_NORETURN extern OCTAVE_API void |
140 err_del_index_out_of_range (bool is1d, octave_idx_type iext, | 142 err_del_index_out_of_range (bool is1d, octave_idx_type iext, |
141 octave_idx_type ext); | 143 octave_idx_type ext); |
142 | 144 |