H5Pregister
is a macro that is mapped to either
H5Pregister1
or
H5Pregister2
,
depending on the needs of the application.
Such macros are provided to facilitate application compatibility. For example:
H5Pregister
macro
will be mapped to H5Pregister1
and
will use the H5Pregister1
syntax
(first signature above)
if an application is coded for HDF5 Release 1.6.x.
H5Pregister
macro
mapped to H5Pregister2
and
will use the H5Pregister2
syntax
(second signature above)
if an application is coded for HDF5 Release 1.8.x.
When both the HDF5 Library and the application are built and
installed with no specific compatibility flags,
H5Pregister
is mapped to the most recent version of
the function, currently
H5Pregister2
.
If the library and/or application is compiled for Release 1.6
emulation, H5Pregister
will be mapped to
H5Pregister1
.
Function-specific flags are available to override these settings
on a function-by-function basis when the application is compiled.
Specific compile-time compatibility flags and the resulting mappings are as follows:
Compatibility setting | H5Pregister mapping |
---|---|
Global settings |
|
No compatibility flag | H5Pregister2 |
Enable deprecated symbols | H5Pregister2 |
Disable deprecated symbols | H5Pregister2 |
Emulate Release 1.6 interface | H5Pregister1 |
Function-level macros |
|
H5Pregister_vers = 2 |
H5Pregister2 |
H5Pregister_vers = 1 |
H5Pregister1 |
For more information on macro use and mappings, see the “API Compatibility Macros in HDF5” document.
H5Pregister
interface
and the only interface available prior to HDF5 Release 1.8.0.
This signature and the corresponding function are now deprecated
but will remain directly callable as
H5Pregister1
.
Signature [2] above was introduced with HDF5 Release 1.8.0
and is the recommended and default interface.
It is directly callable as
H5Pregister2
.
See “API Compatibility Macros in HDF5” for circumstances under which either of these functions might not be available in an installed instance of the HDF5 Library.
If a C routine that takes a function pointer as an argument is called from within C++ code, the C routine should be returned from normally.
Examples of this kind of routine include callbacks such as
H5Pset_elink_cb
and H5Pset_type_conv_cb
and functions such as H5Tconvert
and
H5Ewalk2
.
Exiting the routine in its normal fashion allows the HDF5 C Library to clean up its work properly. In other words, if the C++ application jumps out of the routine back to the C++ “catch” statement, the library is not given the opportunity to close any temporary data structures that were set up when the routine was called. The C++ application should save some state as the routine is started so that any problem that occurs might be diagnosed.
Release | C |
1.8.8 | Fortran updated to Fortran2003. |
1.8.0 | The function
C function H5Pregister renamed to
H5Pregister1
and deprecated in this release.
C macro H5Pregister
and C function H5Pregister2
introduced in this release. |