Mercurial > octave
changeset 30007:62f2c0a3982c
move check_hdf5_types function inside octave namespace
* oct-hdf5-types.h, oct-hdf5-types.cc (check_hdf5_types): Move inside
octave namespace. Change all uses as needed. Provide deprecated
inline wrapper functions to preserve old name.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 18 Aug 2021 16:14:06 -0400 |
parents | 75dff8f2de2e |
children | 9adf2b6a18fc |
files | libinterp/corefcn/ls-hdf5.cc libinterp/corefcn/oct-hdf5-types.cc libinterp/corefcn/oct-hdf5-types.h |
diffstat | 3 files changed, 23 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/ls-hdf5.cc Wed Aug 18 15:47:29 2021 -0400 +++ b/libinterp/corefcn/ls-hdf5.cc Wed Aug 18 16:14:06 2021 -0400 @@ -1080,7 +1080,7 @@ { #if defined (HAVE_HDF5) - check_hdf5_types (); + octave::check_hdf5_types (); std::string retval; @@ -1501,7 +1501,7 @@ { #if defined (HAVE_HDF5) - check_hdf5_types (); + octave::check_hdf5_types (); hdf5_ofstream& hs = dynamic_cast<hdf5_ofstream&> (os);
--- a/libinterp/corefcn/oct-hdf5-types.cc Wed Aug 18 15:47:29 2021 -0400 +++ b/libinterp/corefcn/oct-hdf5-types.cc Wed Aug 18 16:14:06 2021 -0400 @@ -31,6 +31,8 @@ #include "errwarn.h" #include "oct-hdf5.h" +OCTAVE_NAMESPACE_BEGIN + bool check_hdf5_types (bool warn) { @@ -67,3 +69,5 @@ return ok; } + +OCTAVE_NAMESPACE_END
--- a/libinterp/corefcn/oct-hdf5-types.h Wed Aug 18 15:47:29 2021 -0400 +++ b/libinterp/corefcn/oct-hdf5-types.h Wed Aug 18 16:14:06 2021 -0400 @@ -29,8 +29,25 @@ #include "octave-config.h" #if defined (__cplusplus) + // This function only needs to be defined for C++. + +OCTAVE_NAMESPACE_BEGIN + extern bool check_hdf5_types (bool warn = true); + +OCTAVE_NAMESPACE_END + +#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) + +OCTAVE_DEPRECATED (7, "use 'octave::check_hdf5_types' instead") +inline bool check_hdf5_types (bool warn = true) +{ + return octave::check_hdf5_types (warn); +} + +#endif + #endif // Available for C and C++.