Hi Andrea,

On Feb 23, 2016, at 1:37 AM, Andrea Bedini 
<[email protected]<mailto:[email protected]>> wrote:

Hi there,

I’m studying the API for HDF5 file image operations and I am a bit puzzled by 
H5Pget_file_image which retrieves a copy of the file image designated for a VFD 
to use as the initial contents of a file.

H5Pget_file_image wants to allocate the memory for the file image itself, 
either with malloc or with some function provided by the application using 
H5Pset_file_image_callbacks. I find this design needlessly complex (perhaps due 
to my ignorance). Why couldn’t H5Pget_file_image let the application do the 
allocation just like, say,H5Fget_file_image?

H5Fget_file_image has to be called twice. First, to retrieve the size of the 
buffer needed, then to retrieve the file itself.

H5Pget_file_image is called only once.

You are correct, the design is complex. I guess the thinking was to be helpful 
;-)

Elena

Thanks in advance,
Andrea

--
Andrea Bedini
@andreabedini, http://www.andreabedini.com<http://www.andreabedini.com/>

See the impact of my research at https://impactstory.org/AndreaBedini
use https://keybase.io/andreabedini to send me encrypted messages
Key fingerprint = 17D5 FB49 FA18 A068 CF53  C5C2 9503 64C1 B2D5 9591

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]<mailto:[email protected]>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to