Closed NINI1988 closed 6 years ago
https://support.hdfgroup.org/HDF5/doc1.8/RM/RM_H5L.html#Link-GetNameByIdx says the first call with the size NULL or 0 it returns the size it will be?
The test at https://github.com/HDF-NI/hdf5.node/blob/master/test/test_hdf5.js#L69 is working for getMemberNames
is there a name you have that is missing something?
What I really want to do is get rid of going thru return string at https://github.com/HDF-NI/hdf5.node/blob/master/src/methods.cc#L575 and then back to c_str() at https://github.com/HDF-NI/hdf5.node/blob/master/src/methods.cc#L103
checking further
oh it is missing 80 passing (3s) 9 pending 1 failing
co_mocha * was causing this test to be skipped
seems like a bug in hdf5 native H5Lget_name_by_idx which this name_len+1 may work around
81 passing (736ms) 9 pending
passing, committing soon for another travis-ci test
https://github.com/HDF-NI/hdf5.node/blob/ecc0ac312aad4e3815e3e3c42d0e586357eac792/src/methods.cc#L583
should be:
name_len = H5Lget_name_by_idx(id, ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C.get(), name_len+1, H5P_DEFAULT);
name_len+1
changed.