[h5py] 21/26: Dump Cython built-in defs

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:20:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 1.3.1
in repository h5py.

commit 396ee7e0ce1a52ff5ec3cd25e2f14a3aedd7091f
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Sun Nov 28 21:29:24 2010 +0000

    Dump Cython built-in defs
---
 h5py/defs.pxd     | 9 +++++++++
 h5py/h5e.pyx      | 1 -
 h5py/h5l_body.pyx | 1 -
 h5py/h5r.pyx      | 2 --
 h5py/h5s.pyx      | 2 +-
 h5py/h5t.pyx      | 1 -
 h5py/utils.pyx    | 1 -
 7 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/h5py/defs.pxd b/h5py/defs.pxd
index 3141894..33588c4 100644
--- a/h5py/defs.pxd
+++ b/h5py/defs.pxd
@@ -59,6 +59,15 @@ cdef extern from "stdint.h":
   ctypedef signed long long int int64_t
   ctypedef signed long long int uint64_t 
 
+# Can't use Cython defs because they keep moving them around
+cdef extern from "Python.h":
+  ctypedef void PyObject
+  ctypedef ssize_t Py_ssize_t
+
+  PyObject* PyErr_Occurred()
+  void PyErr_SetString(object type, char *message)
+  object PyString_FromStringAndSize(char *v, Py_ssize_t len)
+
 # === Compatibility definitions and macros for h5py ===========================
 
 cdef extern from "compat.h":
diff --git a/h5py/h5e.pyx b/h5py/h5e.pyx
index ce4d554..6c0d773 100644
--- a/h5py/h5e.pyx
+++ b/h5py/h5e.pyx
@@ -17,7 +17,6 @@
 
 include "config.pxi"
 
-from cpython.exc cimport PyErr_SetString, PyErr_Occurred
 from h5 cimport SmartStruct
 
 import _stub
diff --git a/h5py/h5l_body.pyx b/h5py/h5l_body.pyx
index 713b22e..d5ffc42 100644
--- a/h5py/h5l_body.pyx
+++ b/h5py/h5l_body.pyx
@@ -21,7 +21,6 @@ from h5 cimport init_hdf5, SmartStruct
 from h5p cimport PropID, pdefault
 from h5g cimport GroupID
 from utils cimport emalloc, efree
-from cpython cimport PyErr_SetString
 
 init_hdf5()
 
diff --git a/h5py/h5r.pyx b/h5py/h5r.pyx
index cfe5f0d..68193db 100644
--- a/h5py/h5r.pyx
+++ b/h5py/h5r.pyx
@@ -21,8 +21,6 @@ from h5 cimport init_hdf5, ObjectID
 from h5i cimport wrap_identifier
 from h5s cimport SpaceID
 
-from cpython cimport PyString_FromStringAndSize
-
 # Initialization
 init_hdf5()
 
diff --git a/h5py/h5s.pyx b/h5py/h5s.pyx
index eb19445..52c288a 100644
--- a/h5py/h5s.pyx
+++ b/h5py/h5s.pyx
@@ -21,7 +21,7 @@ from h5 cimport init_hdf5
 from utils cimport  require_tuple, convert_dims, convert_tuple, \
                     emalloc, efree, create_numpy_hsize, create_hsize_array
 from numpy cimport ndarray
-from cpython cimport PyString_FromStringAndSize
+
 
 # Initialization
 init_hdf5()
diff --git a/h5py/h5t.pyx b/h5py/h5t.pyx
index 9207f2e..2c5c5ed 100644
--- a/h5py/h5t.pyx
+++ b/h5py/h5t.pyx
@@ -24,7 +24,6 @@ include "config.pxi"
 from h5 cimport init_hdf5, H5PYConfig, get_config
 from h5p cimport PropID, pdefault
 from numpy cimport dtype, ndarray
-from cpython cimport PyString_FromStringAndSize
 from h5r cimport Reference, RegionReference
 
 from utils cimport  emalloc, efree, \
diff --git a/h5py/utils.pyx b/h5py/utils.pyx
index c82cfff..d7bbf3c 100644
--- a/h5py/utils.pyx
+++ b/h5py/utils.pyx
@@ -16,7 +16,6 @@ include "config.pxi"
 
 # Compile-time imports
 from h5 cimport init_hdf5
-from cpython cimport PyErr_SetString
 
 from numpy cimport ndarray, import_array, \
                     NPY_UINT16, NPY_UINT32, NPY_UINT64,  npy_intp, \

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