summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2006-07-05 19:01:50 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2006-07-05 19:01:50 (GMT)
commit801ca2f9cb803b368b36a6c280684c1f6624f169 (patch)
treeed2543e9bc1f2beb9857f442fc8b52b3c371299f /src/H5A.c
parentd582c7bc8ac8679911e4787f5f92cc37b1c9989c (diff)
downloadhdf5-801ca2f9cb803b368b36a6c280684c1f6624f169.zip
hdf5-801ca2f9cb803b368b36a6c280684c1f6624f169.tar.gz
hdf5-801ca2f9cb803b368b36a6c280684c1f6624f169.tar.bz2
[svn-r12452] Purpose:
Feature Description: Revised Link APIs. Solution: New link APIs use H5L* H5*create_expand do not create links to the objects created; this must be done manually with H5Llink. Added APIs to link an object given its ID (H5Llink), to copy links (H5Lcopy), and changed creation APIs (H5Lcreate_hard and H5Lcreate_soft) and query API (H5Lget_linkinfo instead of H5Gget_objinfo). All old APIs are still supported in H5Gdeprec.c . Platforms tested: sol, mir, copper Misc. update: Forgot to update MANIFEST and release docs. Will do after checkin.
Diffstat (limited to 'src/H5A.c')
-rw-r--r--src/H5A.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 43759b8..6135b91 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -72,8 +72,6 @@ static herr_t
H5A_init_interface(void)
{
H5P_genclass_t *crt_pclass;
- size_t nprops; /* Number of properties */
- H5T_cset_t default_cset = H5A_CHAR_ENCODING_DEF;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5A_init_interface)
@@ -92,17 +90,6 @@ H5A_init_interface(void)
if (NULL == (crt_pclass = H5I_object(H5P_CLS_ATTRIBUTE_CREATE_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
- /* Get the number of properties in the class */
- if(H5P_get_nprops_pclass(crt_pclass,&nprops,FALSE)<0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't query number of properties")
-
- /* Assume that if there are properties in the class, they are the default ones */
- if(nprops==0) {
- /* Register the size of the character encoding field */
- if(H5P_register(crt_pclass,H5A_CHAR_ENCODING_NAME,H5A_CHAR_ENCODING_SIZE,&default_cset,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
- }
-
/* Only register the default property list if it hasn't been created yet */
if(H5P_LST_ATTRIBUTE_CREATE_g==(-1)) {
/* Register the default attribute creation property list */
@@ -282,7 +269,7 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
/* If the creation property list is H5P_DEFAULT, use the default character encoding */
if(acpl_id == H5P_DEFAULT)
{
- attr->encoding = H5A_CHAR_ENCODING_DEF;
+ attr->encoding = H5P_CHAR_ENCODING_DEF;
}
else
{
@@ -290,7 +277,7 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
if (NULL == (ac_plist = H5I_object(acpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
- if(H5P_get(ac_plist, H5A_CHAR_ENCODING_NAME, &(attr->encoding)) < 0)
+ if(H5P_get(ac_plist, H5P_CHAR_ENCODING_NAME, &(attr->encoding)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get character encoding flag")
}
@@ -1069,7 +1056,7 @@ H5Aget_create_plist(hid_t attr_id)
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list")
/* Set the character encoding on the new property list */
- if(H5P_set(new_plist, H5A_CHAR_ENCODING_NAME, &(attr->encoding)) < 0)
+ if(H5P_set(new_plist, H5P_CHAR_ENCODING_NAME, &(attr->encoding)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding")
ret_value = new_plist_id;