[h5py] 378/455: Add elink_fapl to H5P
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.
commit d4336f24e01e14773cea8d7577af26b07db8ab60
Author: andrewcollette <andrew.collette at gmail.com>
Date: Sat Jan 30 04:37:40 2010 +0000
Add elink_fapl to H5P
---
h5py/defs.pxd | 2 ++
h5py/h5p_laid.pxi | 14 ++++++++++++++
h5py/tests/low/test_h5p.py | 22 ++++++++++++++++++++++
3 files changed, 38 insertions(+)
diff --git a/h5py/defs.pxd b/h5py/defs.pxd
index 42b8c27..54efe93 100644
--- a/h5py/defs.pxd
+++ b/h5py/defs.pxd
@@ -772,6 +772,8 @@ cdef extern from "hdf5.h":
herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks) except *
herr_t H5Pset_elink_prefix(hid_t plist_id, char *prefix) except *
ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size) except *
+ hid_t H5Pget_elink_fapl(hid_t lapl_id) except *
+ herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id) except *
herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd) except *
herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd) except *
diff --git a/h5py/h5p_laid.pxi b/h5py/h5p_laid.pxi
index 738f5fd..e8e2b68 100644
--- a/h5py/h5p_laid.pxi
+++ b/h5py/h5p_laid.pxi
@@ -73,3 +73,17 @@ cdef class PropLAID(PropInstanceID):
return pstr
+ def set_elink_fapl(self, PropID fapl not None):
+ """ (PropFAID fapl)
+
+ Set the file access property list used when opening external files.
+ """
+ H5Pset_elink_fapl(self.id, fapl.id)
+
+ def get_elink_fapl(self):
+ """ () => PropFAID fapl
+
+ Get the file access property list used when opening external files.
+ """
+ return propwrap(H5Pget_elink_fapl(self.id))
+
diff --git a/h5py/tests/low/test_h5p.py b/h5py/tests/low/test_h5p.py
new file mode 100644
index 0000000..340f44f
--- /dev/null
+++ b/h5py/tests/low/test_h5p.py
@@ -0,0 +1,22 @@
+
+from h5py import tests
+from h5py import *
+
+config = h5.get_config()
+
+class Base(tests.HTest):
+ pass
+
+if config.API_18:
+
+ class TestLAID(Base):
+
+ def setUp(self):
+ self.id = h5p.create(h5p.LINK_ACCESS)
+
+ def test_elink_fapl(self):
+ """ (H5P) elink fapl """
+ fapl = h5p.create(h5p.FILE_ACCESS)
+ self.id.set_elink_fapl(fapl)
+ self.assertEqual(self.id.get_elink_fapl(), fapl)
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git
More information about the debian-science-commits
mailing list