diff options
author | Quincey Koziol <koziol@lbl.gov> | 2020-12-10 17:01:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 17:01:04 (GMT) |
commit | 17a2e88769c15d8684bda4d8a6c9f53836f7b65b (patch) | |
tree | e11decdcdfdd7bf594475b3d9520a403d1478d49 /src/H5VLnative.c | |
parent | 4713a6d23840ed222d90f3ca73f037cb20b5d444 (diff) | |
download | hdf5-17a2e88769c15d8684bda4d8a6c9f53836f7b65b.zip hdf5-17a2e88769c15d8684bda4d8a6c9f53836f7b65b.tar.gz hdf5-17a2e88769c15d8684bda4d8a6c9f53836f7b65b.tar.bz2 |
Enforce VOL framework version compatibility when registering connectors. Also add a version for the connector itself, some refactoring on the register calls, and move the logic for matching / rejecting a VOL connector class from the plugin module to the VOL module. (#151)
Diffstat (limited to 'src/H5VLnative.c')
-rw-r--r-- | src/H5VLnative.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/H5VLnative.c b/src/H5VLnative.c index 0973e34..746264f 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -15,6 +15,16 @@ * using HDF5 VFDs. */ +/****************/ +/* Module Setup */ +/****************/ + +#define H5VL_FRIEND /* Suppress error about including H5VLpkg */ + +/***********/ +/* Headers */ +/***********/ + #include "H5private.h" /* Generic Functions */ #include "H5Aprivate.h" /* Attributes */ #include "H5Dprivate.h" /* Datasets */ @@ -25,7 +35,7 @@ #include "H5Oprivate.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ #include "H5Tprivate.h" /* Datatypes */ -#include "H5VLprivate.h" /* Virtual Object Layer */ +#include "H5VLpkg.h" /* Virtual Object Layer */ #include "H5VLnative_private.h" /* Native VOL connector */ @@ -37,9 +47,10 @@ static herr_t H5VL__native_term(void); /* Native VOL connector class struct */ static const H5VL_class_t H5VL_native_cls_g = { - H5VL_NATIVE_VERSION, /* version */ + H5VL_VERSION, /* VOL class struct version */ H5VL_NATIVE_VALUE, /* value */ H5VL_NATIVE_NAME, /* name */ + H5VL_NATIVE_VERSION, /* connector version */ 0, /* capability flags */ NULL, /* initialize */ H5VL__native_term, /* terminate */ @@ -176,7 +187,7 @@ H5VL_native_register(void) /* Register the native VOL connector, if it isn't already */ if (H5I_INVALID_HID == H5VL_NATIVE_ID_g) if ((H5VL_NATIVE_ID_g = - H5VL_register_connector(&H5VL_native_cls_g, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0) + H5VL__register_connector(&H5VL_native_cls_g, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, H5I_INVALID_HID, "can't create ID for native VOL connector") /* Set return value */ |