[h5py] 08/455: 1.8 compatibility fixes

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:11 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 9dd3f9caf955ebac1400d61bbdd0e2c0aac46989
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Tue May 6 23:19:16 2008 +0000

    1.8 compatibility fixes
---
 h5py/h5a.pyx | 4 +++-
 h5py/h5g.pxd | 2 +-
 h5py/h5p.pxd | 1 -
 h5py/h5p.pyx | 3 +--
 h5py/h5s.pxd | 3 ++-
 h5py/h5s.pyx | 3 +--
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/h5py/h5a.pyx b/h5py/h5a.pyx
index 753c4b6..dcc786a 100755
--- a/h5py/h5a.pyx
+++ b/h5py/h5a.pyx
@@ -230,12 +230,14 @@ def iterate(hid_t loc_id, object func, object data=None, unsigned int startidx=0
     int_tpl = (func, data,[])
 
     retval = H5Aiterate(loc_id, &i, <H5A_operator_t>iter_cb, int_tpl)
+    if retval == 1:
+        i = i - 1  # user bailed out
 
     if retval < 0:
         if len(int_tpl[2]) != 0:
             raise int_tpl[2][0]
         raise H5AttributeError("Error occured during iteration")
-    return i-2
+    return i-1
 
 # === Python extensions =======================================================
 
diff --git a/h5py/h5g.pxd b/h5py/h5g.pxd
index 689b53d..5c3bd96 100755
--- a/h5py/h5g.pxd
+++ b/h5py/h5g.pxd
@@ -19,7 +19,7 @@ from h5 cimport hid_t, hbool_t, herr_t, htri_t, hsize_t, hssize_t, hvl_t
 
 cdef extern from "hdf5.h":
 
-  cdef enum H5G_link_t:
+  ctypedef enum H5G_link_t:
     H5G_LINK_ERROR      = -1,
     H5G_LINK_HARD       = 0,
     H5G_LINK_SOFT       = 1
diff --git a/h5py/h5p.pxd b/h5py/h5p.pxd
index c0007c4..bfafc59 100755
--- a/h5py/h5p.pxd
+++ b/h5py/h5p.pxd
@@ -30,7 +30,6 @@ cdef extern from "hdf5.h":
   int H5P_FILE_ACCESS 
   int H5P_DATASET_CREATE 
   int H5P_DATASET_XFER 
-  int H5P_MOUNT      
 
   # --- Property list operations ----------------------------------------------
   # General operations
diff --git a/h5py/h5p.pyx b/h5py/h5p.pyx
index 4b11686..8dd5ba2 100755
--- a/h5py/h5p.pyx
+++ b/h5py/h5p.pyx
@@ -40,11 +40,10 @@ CLASS_FILE_CREATE    = H5P_FILE_CREATE
 CLASS_FILE_ACCESS    = H5P_FILE_ACCESS
 CLASS_DATASET_CREATE = H5P_DATASET_CREATE
 CLASS_DATASET_XFER   = H5P_DATASET_XFER
-CLASS_MOUNT          = H5P_MOUNT
 
 CLASS_MAPPER = { H5P_NO_CLASS: 'ERROR', H5P_FILE_CREATE: 'FILE CREATION',
                   H5P_FILE_ACCESS: 'FILE ACCESS', H5P_DATASET_CREATE: 'DATASET CREATION',
-                  H5P_DATASET_XFER: 'DATASET TRANSFER', H5P_MOUNT: 'MOUNT'}
+                  H5P_DATASET_XFER: 'DATASET TRANSFER'}
 CLASS_MAPPER = DDict(CLASS_MAPPER)
 
 DEFAULT = H5P_DEFAULT # not really a "class"
diff --git a/h5py/h5s.pxd b/h5py/h5s.pxd
index 1758985..27c3856 100755
--- a/h5py/h5s.pxd
+++ b/h5py/h5s.pxd
@@ -42,7 +42,8 @@ cdef extern from "hdf5.h":
     H5S_NO_CLASS         = -1,  #/*error                                      */
     H5S_SCALAR           = 0,   #/*scalar variable                            */
     H5S_SIMPLE           = 1,   #/*simple data space                          */
-    H5S_COMPLEX          = 2    #/*complex data space                         */
+    # no longer defined in 1.8
+    #H5S_COMPLEX          = 2    #/*complex data space                         */
 
   cdef enum H5S_sel_type:
     H5S_SEL_ERROR	= -1, 	    #/* Error			*/
diff --git a/h5py/h5s.pyx b/h5py/h5s.pyx
index e3a3c6e..e1a5fe2 100755
--- a/h5py/h5s.pyx
+++ b/h5py/h5s.pyx
@@ -56,9 +56,8 @@ SPACE_MAPPER = DDict({H5S_ALL: 'ALL', H5S_UNLIMITED: 'UNLIMITED'})
 CLASS_NO_CLASS = H5S_NO_CLASS
 CLASS_SCALAR   = H5S_SCALAR
 CLASS_SIMPLE   = H5S_SIMPLE
-CLASS_COMPLEX  = H5S_COMPLEX
 CLASS_MAPPER = {H5S_NO_CLASS: 'NO CLASS', H5S_SCALAR: 'SCALAR',
-                H5S_SIMPLE: 'SIMPLE', H5S_COMPLEX: 'COMPLEX' }
+                H5S_SIMPLE: 'SIMPLE'}
 CLASS_MAPPER = DDict(CLASS_MAPPER)
 
 # === Basic dataspace operations ==============================================

-- 
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