summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2006-08-02 23:41:53 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2006-08-02 23:41:53 (GMT)
commit3e755623cb24eb37c19fa645d74dc46948318253 (patch)
tree66e0a3807f37d50a8d6e5f3469864c604cd837c6 /src/H5T.c
parent71a4d0e9c48c4e02e5384cd3f6e38a2a530e9d22 (diff)
downloadhdf5-3e755623cb24eb37c19fa645d74dc46948318253.zip
hdf5-3e755623cb24eb37c19fa645d74dc46948318253.tar.gz
hdf5-3e755623cb24eb37c19fa645d74dc46948318253.tar.bz2
[svn-r12528] Added User-Defined links to the library.
Users can create external links using H5L_create_external(). These links point to an object in another HDF5 file. Users can alter the behavior of external links or create new kinds of links by registering callbacks using the H5L interface. Added tests, tools support, etc. Also a number of other, minor changes have been made (some restructuring of the H5L interface, for instance). Additional documentation and examples are forthcoming.
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 744e7f3..44ac21f 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -733,6 +733,7 @@ H5T_init_interface(void)
herr_t status;
unsigned copied_dtype=1; /* Flag to indicate whether datatype was copied or allocated (for error cleanup) */
H5P_genclass_t *crt_pclass; /* Property list class for datatype creation properties */
+ H5P_genclass_t *acc_pclass; /* Property list class for datatype access properties */
herr_t ret_value=SUCCEED;
FUNC_ENTER_NOAPI_NOINIT(H5T_init_interface);
@@ -1325,6 +1326,20 @@ H5T_init_interface(void)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class")
} /* end if */
+ /* ========== Datatype Access Property Class Initialization ============*/
+ assert(H5P_CLS_DATATYPE_ACCESS_g!=-1);
+
+ /* Get the pointer to dataset access class */
+ if(NULL == (acc_pclass = H5I_object(H5P_CLS_DATATYPE_ACCESS_g)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
+
+ /* Only register the default property list if it hasn't been created yet */
+ if(H5P_LST_DATATYPE_ACCESS_g == (-1)) {
+ /* Register the default dataset access property list */
+ if((H5P_LST_DATATYPE_ACCESS_g = H5P_create_id(acc_pclass))<0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class")
+ } /* end if */
+
done:
/* General cleanup */
if (compound!=NULL)