diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-26 02:50:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-26 02:50:31 (GMT) |
commit | 3706d53f155e3ac86bc8547c9287bcd857c4eca8 (patch) | |
tree | 346b21f5faf06429015d0587bcbff063ab669d1c /src | |
parent | 8f84b136fc7a9eff4354416307ae3acc8f73d038 (diff) | |
download | hdf5-3706d53f155e3ac86bc8547c9287bcd857c4eca8.zip hdf5-3706d53f155e3ac86bc8547c9287bcd857c4eca8.tar.gz hdf5-3706d53f155e3ac86bc8547c9287bcd857c4eca8.tar.bz2 |
[svn-r14156] Description:
Add API versioning to H5Tcommit()
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Tdeprec.c | 12 | ||||
-rw-r--r-- | src/H5Tpublic.h | 18 | ||||
-rw-r--r-- | src/H5vers.txt | 1 | ||||
-rw-r--r-- | src/H5version.h | 15 |
4 files changed, 41 insertions, 5 deletions
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c index 63a576f..8dbcc4a 100644 --- a/src/H5Tdeprec.c +++ b/src/H5Tdeprec.c @@ -105,11 +105,13 @@ H5T_init_deprec_interface(void) /*------------------------------------------------------------------------- - * Function: H5Tcommit + * Function: H5Tcommit1 * * Purpose: Save a transient datatype to a file and turn the type handle * into a named, immutable type. * + * Note: Deprecated in favor of H5Tcommit2 + * * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke @@ -118,13 +120,13 @@ H5T_init_deprec_interface(void) *------------------------------------------------------------------------- */ herr_t -H5Tcommit(hid_t loc_id, const char *name, hid_t type_id) +H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id) { H5G_loc_t loc; /* Location to create datatype */ H5T_t *type; /* Datatype for ID */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_API(H5Tcommit, FAIL) + FUNC_ENTER_API(H5Tcommit1, FAIL) H5TRACE3("e", "i*si", loc_id, name, type_id); /* Check arguments */ @@ -142,7 +144,7 @@ H5Tcommit(hid_t loc_id, const char *name, hid_t type_id) done: FUNC_LEAVE_API(ret_value) -} /* end H5Tcommit() */ +} /* end H5Tcommit1() */ /*------------------------------------------------------------------------- @@ -150,6 +152,8 @@ done: * * Purpose: Opens a named datatype. * + * Note: Deprecated in favor of H5Topen2 + * * Return: Success: Object ID of the named datatype. * * Failure: Negative diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index 1a1275d..fbdcba8 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -598,7 +598,23 @@ H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, * Use of these functions and variables is deprecated. */ H5_DLL hid_t H5Topen(hid_t loc_id, const char *name); -H5_DLL herr_t H5Tcommit(hid_t loc_id, const char *name, hid_t type_id); + +/* Symbols defined for compatibility with previous versions of the HDF5 API. + * + * Use of these symbols is deprecated. + */ +#ifndef H5_NO_DEPRECATED_SYMBOLS + +/* Macros */ + + +/* Typedefs */ + + +/* Function prototypes */ +H5_DLL herr_t H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id); + +#endif /* H5_NO_DEPRECATED_SYMBOLS */ #ifdef __cplusplus } diff --git a/src/H5vers.txt b/src/H5vers.txt index ba2eac0..6d8e732 100644 --- a/src/H5vers.txt +++ b/src/H5vers.txt @@ -54,6 +54,7 @@ FUNCTION: H5Ewalk; H5E_walk, H5E_error; v10, v18 FUNCTION: H5Gcreate; ; v10, v18 FUNCTION: H5Gopen; ; v10, v18 FUNCTION: H5Rget_obj_type; ; v16, v18 +FUNCTION: H5Tcommit; ; v10, v18 # API typedefs # (although not required, it's easier to compare this file with the headers diff --git a/src/H5version.h b/src/H5version.h index 8ea79be..818b699 100644 --- a/src/H5version.h +++ b/src/H5version.h @@ -74,6 +74,10 @@ #define H5Rget_obj_type_vers 1 #endif /* !defined(H5Rget_obj_type_vers) */ +#if !defined(H5Tcommit_vers) +#define H5Tcommit_vers 1 +#endif /* !defined(H5Tcommit_vers) */ + /************/ /* Typedefs */ /************/ @@ -198,6 +202,17 @@ #error "H5Rget_obj_type_vers set to invalid value" #endif /* H5Rget_obj_type_vers */ +#if !defined(H5Tcommit_vers) || H5Tcommit_vers == 2 +#ifndef H5Tcommit_vers +#define H5Tcommit_vers 2 +#endif /* H5Tcommit_vers */ +#define H5Tcommit H5Tcommit2 +#elif H5Tcommit_vers == 1 +#define H5Tcommit H5Tcommit1 +#else /* H5Tcommit_vers */ +#error "H5Tcommit_vers set to invalid value" +#endif /* H5Tcommit_vers */ + /************/ /* Typedefs */ /************/ |