summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2003-02-27 21:28:01 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2003-02-27 21:28:01 (GMT)
commit86c1f6a750da020601849e96fb331621d85e833b (patch)
treee906980503a527987a2546d849d8a8c24e34341f /fortran/src
parent478d199a62f3be5630c45902a0980de0be812013 (diff)
downloadhdf5-86c1f6a750da020601849e96fb331621d85e833b.zip
hdf5-86c1f6a750da020601849e96fb331621d85e833b.tar.gz
hdf5-86c1f6a750da020601849e96fb331621d85e833b.tar.bz2
[svn-r6442]
Purpose: Bug fix Description: Enumeration datatype was broken in Fortran Solution: Fixed C wrapper functions to pass variables correctly from Fortran to C layer. Platforms tested: modi4, arabica, eirene
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5Tf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index 789649f..690d969 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -1393,9 +1393,9 @@ nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
c_name = (char *)HD5f2cstring(name, c_namelen);
if (c_name == NULL) return ret_value;
- c_type_id = *type_id;
- c_value = *value;
- error = H5Tenum_insert(c_type_id, c_name, (void*)c_value);
+ c_type_id = (hid_t)*type_id;
+ c_value = (int)*value;
+ error = H5Tenum_insert(c_type_id, c_name, &c_value);
HDfree(c_name);
if(error < 0) return ret_value;
@@ -1428,7 +1428,7 @@ nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen)
herr_t error;
int c_value;
c_value = *value;
- c_namelen = (size_t)*namelen;
+ c_namelen = ((size_t)*namelen) +1;
c_name = (char *)malloc(sizeof(char)*c_namelen);
c_type_id = *type_id;
error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen);