diff options
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 37 |
1 files changed, 23 insertions, 14 deletions
@@ -462,7 +462,7 @@ H5T_init_interface(void) "memory allocation failed"); } dt->state = H5T_STATE_IMMUTABLE; - H5F_addr_undef (&(dt->ent.header)); + dt->ent.header = H5F_ADDR_UNDEF; dt->type = H5T_OPAQUE; dt->size = 1; dt->u.opaque.tag = H5MM_strdup(""); @@ -837,7 +837,7 @@ H5T_init_interface(void) "memory allocation failed"); } dt->state = H5T_STATE_IMMUTABLE; - H5F_addr_undef (&(dt->ent.header)); + dt->ent.header = H5F_ADDR_UNDEF; dt->type = H5T_STRING; dt->size = 1; dt->u.atomic.order = H5T_ORDER_NONE; @@ -863,7 +863,7 @@ H5T_init_interface(void) "memory allocation failed"); } dt->state = H5T_STATE_IMMUTABLE; - H5F_addr_undef (&(dt->ent.header)); + dt->ent.header = H5F_ADDR_UNDEF; dt->type = H5T_STRING; dt->size = 1; dt->u.atomic.order = H5T_ORDER_NONE; @@ -889,7 +889,7 @@ H5T_init_interface(void) "memory allocation failed"); } dt->state = H5T_STATE_IMMUTABLE; - H5F_addr_undef (&(dt->ent.header)); + dt->ent.header = H5F_ADDR_UNDEF; dt->type = H5T_REFERENCE; dt->size = H5R_OBJ_REF_BUF_SIZE; dt->u.atomic.order = H5T_ORDER_NONE; @@ -909,7 +909,7 @@ H5T_init_interface(void) "memory allocation failed"); } dt->state = H5T_STATE_IMMUTABLE; - H5F_addr_undef (&(dt->ent.header)); + dt->ent.header = H5F_ADDR_UNDEF; dt->type = H5T_REFERENCE; dt->size = H5R_DSET_REG_REF_BUF_SIZE; dt->u.atomic.order = H5T_ORDER_NONE; @@ -3903,17 +3903,25 @@ H5Tvlen_create(hid_t base_id) H5TRACE1("i","i",base_id); /* Check args */ - if (H5I_DATATYPE!=H5I_get_type(base_id) || NULL==(base=H5I_object(base_id))) { - HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype"); + if (H5I_DATATYPE!=H5I_get_type(base_id) || + NULL==(base=H5I_object(base_id))) { + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, + "not an valid base datatype"); } /* Build new type */ if (NULL==(dt=H5MM_calloc(sizeof(H5T_t)))) { - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, + "memory allocation failed"); } - H5F_addr_undef (&(dt->ent.header)); + dt->ent.header = H5F_ADDR_UNDEF; dt->type = H5T_VLEN; - dt->force_conv = TRUE; /* Force conversions (i.e. memory to memory conversions should duplicate data, not point to the same VL sequences */ + + /* + * Force conversions (i.e. memory to memory conversions should duplicate + * data, not point to the same VL sequences + */ + dt->force_conv = TRUE; dt->parent = H5T_copy(base, H5T_COPY_ALL); /* Set up VL information */ @@ -3923,7 +3931,8 @@ H5Tvlen_create(hid_t base_id) /* Atomize the type */ if ((ret_value=H5I_register(H5I_DATATYPE, dt))<0) { - HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype"); + HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, + "unable to register datatype"); } FUNC_LEAVE(ret_value); @@ -4571,7 +4580,7 @@ H5T_create(H5T_class_t type, size_t size) "unknown data type class"); } - H5F_addr_undef (&(dt->ent.header)); + dt->ent.header = H5F_ADDR_UNDEF; dt->size = size; FUNC_LEAVE(dt); } @@ -4761,7 +4770,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) */ new_dt->state = H5T_STATE_TRANSIENT; HDmemset (&(new_dt->ent), 0, sizeof(new_dt->ent)); - H5F_addr_undef (&(new_dt->ent.header)); + new_dt->ent.header = H5F_ADDR_UNDEF; break; case H5T_COPY_ALL: @@ -4941,7 +4950,7 @@ H5T_commit (H5G_entry_t *loc, const char *name, H5T_t *type) if (ret_value<0) { if (H5F_addr_defined(type->ent.header)) { H5O_close(&(type->ent)); - H5F_addr_undef (&(type->ent.header)); + type->ent.header = H5F_ADDR_UNDEF; } } FUNC_LEAVE (ret_value); |