[h5py] 232/455: Doc updates; make LZF filter C++ compliant

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 cfe05eb94da1a19a779d37093a1603dad8ddcf1d
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Mon Feb 16 05:58:54 2009 +0000

    Doc updates; make LZF filter C++ compliant
---
 lzf/README.txt   | 15 +++++++++------
 lzf/lzf/lzfP.h   |  9 ++++++++-
 lzf/lzf_filter.h | 12 ++++++++++--
 setup.py         |  4 +---
 4 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/lzf/README.txt b/lzf/README.txt
index 1da33bd..0cfd767 100644
--- a/lzf/README.txt
+++ b/lzf/README.txt
@@ -1,5 +1,5 @@
 ===============================
-LZF filter for HDF5, revision 1
+LZF filter for HDF5, revision 2
 ===============================
 
 The LZF filter provides high-speed compression with acceptable compression
@@ -8,7 +8,8 @@ cost of a slightly worse compression ratio. It's appropriate for large
 datasets of low to moderate complexity, for which some compression is
 much better than none, but for which the speed of DEFLATE is unacceptable.
 
-Both HDF5 versions 1.6 and 1.8 are supported.
+Both HDF5 versions 1.6 and 1.8 are supported.  This code is released under
+the BSD license.
 
 
 Using the filter from HDF5
@@ -42,10 +43,11 @@ example:
 It can also be built as a shared library, although you will have to install
 the resulting library somewhere the runtime linker can find it:
 
-    $ gcc -02 -lhdf5 -fPIC -shared lzf/*.c lzf_filter.c -o liblzf_filter.so
+    $ gcc -O2 -lhdf5 -fPIC -shared lzf/*.c lzf_filter.c -o liblzf_filter.so
 
-This filter has not been tested with C++ code.  As in these examples, using
-option -O1 or higher is strongly recommended for increased performance.
+A similar procedure should be used for building C++ code.  As in these
+examples, using option -O1 or higher is strongly recommended for increased
+performance.
 
 
 Contact
@@ -53,7 +55,8 @@ Contact
 
 This filter is maintained as part of the HDF5 for Python (h5py) project.  The
 goal of h5py is to provide access to the majority of the HDF5 C API and feature
-set from Python.
+set from Python.  The most recent version of h5py (1.1) includes the LZF
+filter by default.
 
 * Downloads and bug tracker:        http://h5py.googlecode.com
 
diff --git a/lzf/lzf/lzfP.h b/lzf/lzf/lzfP.h
index 37730eb..8414da4 100644
--- a/lzf/lzf/lzfP.h
+++ b/lzf/lzf/lzfP.h
@@ -52,7 +52,7 @@
  * For best compression, use 15 or 16 (or more, up to 23).
  */
 #ifndef HLOG
-# define HLOG 17
+# define HLOG 17  /* Avoid pathological case at HLOG=16   A.C. 2/15/09 */
 #endif
 
 /*
@@ -91,6 +91,12 @@
 # define INIT_HTAB 0
 #endif
 
+/* =======================================================================
+    Changing things below this line may break the HDF5 LZF filter.
+    A.C. 2/15/09
+   =======================================================================
+*/
+
 /*
  * Avoid assigning values to errno variable? for some embedding purposes
  * (linux kernel for example), this is neccessary. NOTE: this breaks
@@ -117,6 +123,7 @@
  * This check is not normally noticable on modern hardware
  * (<1% slowdown), but might slow down older cpus considerably.
  */
+
 #ifndef CHECK_INPUT
 # define CHECK_INPUT 1
 #endif
diff --git a/lzf/lzf_filter.h b/lzf/lzf_filter.h
index e7ee8d5..921ba9a 100644
--- a/lzf/lzf_filter.h
+++ b/lzf/lzf_filter.h
@@ -14,17 +14,25 @@
 #ifndef H5PY_LZF_H
 #define H5PY_LZF_H
 
-#define H5PY_FILTER_LZF_VERSION 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Filter revision number, starting at 1 */
+#define H5PY_FILTER_LZF_VERSION 2
 
 /* Filter ID registered with the HDF Group as of 2/6/09.  For maintenance
    requests, contact the filter author directly. */
 #define H5PY_FILTER_LZF 32000
 
-
 /* Register the filter with the library. Returns a negative value on failure, 
    and a non-negative value on success.
 */
 int register_lzf(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 
diff --git a/setup.py b/setup.py
index c8a6df5..6f3b903 100644
--- a/setup.py
+++ b/setup.py
@@ -229,9 +229,7 @@ class ExtensionCreator(object):
             self.runtime_dirs = self.library_dirs
             self.extra_compile_args = ['-DH5_USE_16_API', '-Wno-unused', '-Wno-uninitialized']
             self.extra_link_args = []
-            
-            if sys.platform == 'darwin':
-                self.extra_compile_args += ['-DH5PY_DISABLE_LZF_ASM']
+
     
     def create_extension(self, name, extra_src=None):
         """ Create a distutils Extension object for the given module.  A list

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