GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
oct-hdf5-types.cc
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2016-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if defined (HAVE_CONFIG_H)
27# include "config.h"
28#endif
29
30#include "error.h"
31#include "errwarn.h"
32#include "oct-hdf5.h"
33
35
36bool
38{
39 static bool checked = false;
40 static bool ok = false;
41
42 if (! checked)
43 {
44#if defined (HAVE_HDF5)
45
46 ok = sizeof (octave_hdf5_id) >= sizeof (hid_t);
47
48 if (warn && ! ok)
50 ("Octave:internal",
51 "the size of octave_hdf5_id is smaller than the size of HDF5 hid_t");
52
53 ok = sizeof (octave_hdf5_err) >= sizeof (herr_t);
54
55 if (warn && ! ok)
57 ("Octave:internal",
58 "the size of octave_hdf5_err is smaller than the size of HDF5 herr_t");
59#else
60
61 octave_unused_parameter (warn);
62
63 warn_disabled_feature ("check_hdf5_id_type", "HDF5");
64
65#endif
66
67 checked = true;
68 }
69
70 return ok;
71}
72
73OCTAVE_END_NAMESPACE(octave)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void warning_with_id(const char *id, const char *fmt,...)
Definition error.cc:1093
void warn_disabled_feature(const std::string &fcn, const std::string &feature, const std::string &pkg)
Definition errwarn.cc:318
bool check_hdf5_types(bool warn)
int octave_hdf5_err
int64_t octave_hdf5_id