[h5py] 227/455: Remove LZF compatibility macro requirement; fix compiler warnings
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:36 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 7ba6b78ea67b1628c997688916e53a777b578867
Author: andrewcollette <andrew.collette at gmail.com>
Date: Fri Feb 13 22:12:13 2009 +0000
Remove LZF compatibility macro requirement; fix compiler warnings
---
lzf/example.c | 8 ++++----
lzf/lzf_filter.c | 13 ++++++++-----
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/lzf/example.c b/lzf/example.c
index 7277c34..9dda5a2 100644
--- a/lzf/example.c
+++ b/lzf/example.c
@@ -17,8 +17,8 @@
The filter is completely stateless, and so is safe to statically
link into the final program if desired. Using gcc with option -O1
- or higher is recommended. If building with HDF5 1.8, you must
- define H5_USE_16_API when compiling.
+ or higher is recommended. The filter can be built with either HDF5
+ 1.6 or 1.8, regardless of the HDF5 API compatibility macro settings.
To compile this program:
@@ -67,7 +67,7 @@ int main(){
r = register_lzf();
if(r<0) goto failed;
- sid = H5Screate_simple(3, &shape, NULL);
+ sid = H5Screate_simple(3, shape, NULL);
if(sid<0) goto failed;
fid = H5Fcreate("test_lzf.hdf5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -77,7 +77,7 @@ int main(){
if(plist<0) goto failed;
/* Chunked layout required for filters */
- r = H5Pset_chunk(plist, 3, &chunkshape);
+ r = H5Pset_chunk(plist, 3, chunkshape);
if(r<0) goto failed;
/* Use of the shuffle filter VASTLY improves performance of this
diff --git a/lzf/lzf_filter.c b/lzf/lzf_filter.c
index b2bcb00..23dec5b 100644
--- a/lzf/lzf_filter.c
+++ b/lzf/lzf_filter.c
@@ -33,11 +33,14 @@
#define H5PY_LZF_16API 1
#define PUSH_ERR(func, minor, str) H5Epush(__FILE__, func, __LINE__, H5E_PLINE, minor, str)
+#define H5PY_GET_FILTER H5Pget_filter_by_id
+
#else
#define H5PY_LZF_16API 0
#define PUSH_ERR(func, minor, str) H5Epush1(__FILE__, func, __LINE__, H5E_PLINE, minor, str)
+#define H5PY_GET_FILTER(a,b,c,d,e,f,g) H5Pget_filter_by_id2(a,b,c,d,e,f,g,NULL)
#endif
@@ -58,7 +61,7 @@ int register_lzf(void){
(H5Z_filter_t)(H5PY_FILTER_LZF),
"lzf",
NULL,
- (H5Z_func_t)(lzf_set_local),
+ (H5Z_set_local_func_t)(lzf_set_local),
(H5Z_func_t)(lzf_filter)
};
#else
@@ -68,7 +71,7 @@ int register_lzf(void){
1, 1,
"lzf",
NULL,
- (H5Z_func_t)(lzf_set_local),
+ (H5Z_set_local_func_t)(lzf_set_local),
(H5Z_func_t)(lzf_filter)
};
#endif
@@ -98,9 +101,9 @@ herr_t lzf_set_local(hid_t dcpl, hid_t type, hid_t space){
unsigned int flags;
size_t nelements = 8;
- unsigned int values[] = {0,0,0,0,0,0,0,0};
+ unsigned values[] = {0,0,0,0,0,0,0,0};
- r = H5Pget_filter_by_id(dcpl, H5PY_FILTER_LZF, &flags, &nelements, &values, 0, NULL);
+ r = H5PY_GET_FILTER(dcpl, H5PY_FILTER_LZF, &flags, &nelements, values, 0, NULL);
if(r<0) return -1;
if(nelements < 3) nelements = 3; /* First 3 slots reserved. If any higher
@@ -111,7 +114,7 @@ herr_t lzf_set_local(hid_t dcpl, hid_t type, hid_t space){
if(values[0]==0) values[0] = H5PY_FILTER_LZF_VERSION;
if(values[1]==0) values[1] = LZF_VERSION;
- ndims = H5Pget_chunk(dcpl, 32, &chunkdims);
+ ndims = H5Pget_chunk(dcpl, 32, chunkdims);
if(ndims<0) return -1;
if(ndims>32){
PUSH_ERR("lzf_set_local", H5E_CALLBACK, "Chunk rank exceeds limit");
--
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