H5Isearch/H5Inmembers on built-in types?

Hello!

I'm using HDF5 library by loading it dynamically into my application. I also use custom virtual file driver.

Because the library is loaded and unloaded dynamically, there is no single entry point in my program where I could register my VFD once. Instead, I register the VFD right before I open the file. However, I need to check that the VFD has not been registered yet (otherwise, I would deplete VFD slots quickly).

It seemed that H5Isearch(H5I_VFL, ...) would be helpful, but I bumped into the following assertion in H5I.c:

     if(H5I_IS_LIB_TYPE(type))
         HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")

I think such assertion inside H5Isearch and H5Inmembers are too restrictive. Those functions are read-only and can't possibly break internal library structures.

Can the assertion be removed from H5Isearch and H5Inmembers, to make them work on H5I_VFL and other built-in types?

Best wishes,
Andrey Paramonov

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Einmal essen gehen :wink:

···

On Wed, May 28, 2014 at 3:32 PM, Андрей Парамонов <paramon@acdlabs.ru>wrote:

Hello!

I'm using HDF5 library by loading it dynamically into my application. I
also use custom virtual file driver.

Because the library is loaded and unloaded dynamically, there is no single
entry point in my program where I could register my VFD once. Instead, I
register the VFD right before I open the file. However, I need to check
that the VFD has not been registered yet (otherwise, I would deplete VFD
slots quickly).

It seemed that H5Isearch(H5I_VFL, ...) would be helpful, but I bumped into
the following assertion in H5I.c:

    if(H5I_IS_LIB_TYPE(type))
        HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public
function on library type")

I think such assertion inside H5Isearch and H5Inmembers are too
restrictive. Those functions are read-only and can't possibly break
internal library structures.

Can the assertion be removed from H5Isearch and H5Inmembers, to make them
work on H5I_VFL and other built-in types?

Best wishes,
Andrey Paramonov

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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