diff --git a/Makefile b/Makefile index cb214a35..5798c431 100644 --- a/Makefile +++ b/Makefile @@ -1451,6 +1451,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_AIX b/Makefile_AIX index 5cd44956..ffea30d5 100644 --- a/Makefile_AIX +++ b/Makefile_AIX @@ -1446,6 +1446,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_IRIX_gcc b/Makefile_IRIX_gcc index 087dbe7d..9592884d 100644 --- a/Makefile_IRIX_gcc +++ b/Makefile_IRIX_gcc @@ -1451,6 +1451,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_LINUX b/Makefile_LINUX index 82dfbe9b..e16f6aa2 100644 --- a/Makefile_LINUX +++ b/Makefile_LINUX @@ -1450,6 +1450,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_LINUX_64 b/Makefile_LINUX_64 index e2771863..6eb63301 100644 --- a/Makefile_LINUX_64 +++ b/Makefile_LINUX_64 @@ -1451,6 +1451,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_LINUX_DMALLOC b/Makefile_LINUX_DMALLOC index bb3f5475..334e82fa 100644 --- a/Makefile_LINUX_DMALLOC +++ b/Makefile_LINUX_DMALLOC @@ -1450,6 +1450,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_LINUX_gcc42 b/Makefile_LINUX_gcc42 index cfb695be..0e3b3058 100644 --- a/Makefile_LINUX_gcc42 +++ b/Makefile_LINUX_gcc42 @@ -1451,6 +1451,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_LINUX_gcc42_DMALLOC b/Makefile_LINUX_gcc42_DMALLOC index 72d75e09..89a55144 100644 --- a/Makefile_LINUX_gcc42_DMALLOC +++ b/Makefile_LINUX_gcc42_DMALLOC @@ -1451,6 +1451,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_MINGW b/Makefile_MINGW index 300e7378..580b3301 100644 --- a/Makefile_MINGW +++ b/Makefile_MINGW @@ -1463,6 +1463,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_MSYS2 b/Makefile_MSYS2 index cc4a7835..3e6cfba5 100644 --- a/Makefile_MSYS2 +++ b/Makefile_MSYS2 @@ -1452,6 +1452,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_OSX b/Makefile_OSX index b1e25f96..93718a3b 100644 --- a/Makefile_OSX +++ b/Makefile_OSX @@ -1448,6 +1448,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_OSX_gcc42 b/Makefile_OSX_gcc42 index 9c657880..1b007fe7 100644 --- a/Makefile_OSX_gcc42 +++ b/Makefile_OSX_gcc42 @@ -1453,6 +1453,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/Makefile_OSX_gcc42_DMALLOC b/Makefile_OSX_gcc42_DMALLOC index 22502918..cb0b51bb 100644 --- a/Makefile_OSX_gcc42_DMALLOC +++ b/Makefile_OSX_gcc42_DMALLOC @@ -1453,6 +1453,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/jcbf/jcbf.i b/jcbf/jcbf.i deleted file mode 100644 index e373ca19..00000000 --- a/jcbf/jcbf.i +++ /dev/null @@ -1,44 +0,0 @@ -// swig -Iinclude -java -package org.iucr.jcbf.ib -outdir java cbf.i -// javac -d . java/*.java -// jar cf cbflib-0.8.0.jar org -// gcc -fPIC -fpic -c cbf_wrap.c -I/dls_sw/dasc/jdk/jdk1.6.0_11/include -I/dls_sw/dasc/jdk/jdk1.6.0_11/include/linux -Iinclude -// gcc -shared cbf_wrap.o -o solib/libcbf_wrap.so -Lsolib -lcbf -%module cbf - - -%{ -/* Includes the header in the wrapper code */ -#include "cbf.h" -%} - -%include "cpointer.i" - -// wrap some C pointers in classes -%pointer_class(unsigned int, uintp) -%pointer_class(double, doublep) - -// wrap char** in functions -%pointer_functions(const char *, charpp) - -// Don't expose the memory allocation/de-allocation functions -%ignore cbf_make_handle(cbf_handle *ppchs); -%ignore cbf_free_handle(cbf_handle pchs); - -/* Parse the header file to generate wrappers */ -%include "cbf.h" - -// Add in a custom proxy constructor and destructor -%extend cbf_handle_struct { - cbf_handle_struct() { - cbf_handle_struct *pchs = 0; - cbf_make_handle(&pchs); - return pchs; - } - ~cbf_handle_struct() { - cbf_free_handle(self); - } -} - -// File I/O functions -FILE *fopen(char *name, char *mode); -void fclose(FILE *); diff --git a/libtool/build_libtool.sh b/libtool/build_libtool.sh old mode 100644 new mode 100755 diff --git a/libtool/ltmain.sh b/libtool/ltmain.sh old mode 100644 new mode 100755 diff --git a/m4/Makefile.m4 b/m4/Makefile.m4 index ec8e2c36..0edb0202 100644 --- a/m4/Makefile.m4 +++ b/m4/Makefile.m4 @@ -1713,6 +1713,7 @@ $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ $(PYCBF)/cbfdetectorwrappers.i \ $(PYCBF)/cbfgenericwrappers.i \ $(PYCBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) $(PYCBF)/pycbfinstall: diff --git a/ply-3.2/dist/ply-3.2-py2.6.egg b/ply-3.2/dist/ply-3.2-py2.6.egg deleted file mode 100644 index 4138583e..00000000 Binary files a/ply-3.2/dist/ply-3.2-py2.6.egg and /dev/null differ diff --git a/ply-3.2/ply.egg-info/PKG-INFO b/ply-3.2/ply.egg-info/PKG-INFO index 2d1b1fa4..9061f117 100644 --- a/ply-3.2/ply.egg-info/PKG-INFO +++ b/ply-3.2/ply.egg-info/PKG-INFO @@ -11,9 +11,9 @@ Description: features include the fact that its implemented entirely in Python and it uses LALR(1) parsing which is efficient and well suited for larger grammars. - PLY provides most of the standard lex/yacc features including support for empty - productions, precedence rules, error recovery, and support for ambiguous grammars. + PLY provides most of the standard lex/yacc features including support for empty + productions, precedence rules, error recovery, and support for ambiguous grammars. - PLY is extremely easy to use and provides very extensive error checking. + PLY is extremely easy to use and provides very extensive error checking. Platform: UNKNOWN diff --git a/pycbf/pycbf.py b/pycbf/pycbf.py index a4176e4b..adba1966 100644 --- a/pycbf/pycbf.py +++ b/pycbf/pycbf.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 3.0.7 +# Version 3.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -8,8 +8,19 @@ -from sys import version_info -if version_info >= (2, 6, 0): +from sys import version_info as _swig_python_version_info +if _swig_python_version_info >= (2, 7, 0): + def swig_import_helper(): + import importlib + pkg = __name__.rpartition('.')[0] + mname = '.'.join((pkg, '_pycbf')).lstrip('.') + try: + return importlib.import_module(mname) + except ImportError: + return importlib.import_module('_pycbf') + _pycbf = swig_import_helper() + del swig_import_helper +elif _swig_python_version_info >= (2, 6, 0): def swig_import_helper(): from os.path import dirname import imp @@ -29,12 +40,16 @@ def swig_import_helper(): del swig_import_helper else: import _pycbf -del version_info +del _swig_python_version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ def _swig_setattr_nondynamic(self, class_type, name, value, static=1): if (name == "thisown"): @@ -59,38 +74,31 @@ def _swig_setattr(self, class_type, name, value): return _swig_setattr_nondynamic(self, class_type, name, value, 0) -def _swig_getattr_nondynamic(self, class_type, name, static=1): +def _swig_getattr(self, class_type, name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name, None) if method: return method(self) - if (not static): - return object.__getattr__(self, name) - else: - raise AttributeError(name) - -def _swig_getattr(self, class_type, name): - return _swig_getattr_nondynamic(self, class_type, name, 0) + raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() - except: + except __builtin__.Exception: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 -except AttributeError: +except __builtin__.Exception: class _object: pass _newclass = 0 - __author__ = "Jon Wright " __date__ = "14 Dec 2005" __version__ = "CBFlib 0.9" @@ -136,7 +144,7 @@ def __init__(self, nelements): this = _pycbf.new_doubleArray(nelements) try: self.this.append(this) - except: + except __builtin__.Exception: self.this = this __swig_destroy__ = _pycbf.delete_doubleArray __del__ = lambda self: None @@ -149,9 +157,10 @@ def __setitem__(self, index, value): def cast(self): return _pycbf.doubleArray_cast(self) - __swig_getmethods__["frompointer"] = lambda x: _pycbf.doubleArray_frompointer if _newclass: frompointer = staticmethod(_pycbf.doubleArray_frompointer) + else: + frompointer = _pycbf.doubleArray_frompointer doubleArray_swigregister = _pycbf.doubleArray_swigregister doubleArray_swigregister(doubleArray) @@ -170,7 +179,7 @@ def __init__(self, nelements): this = _pycbf.new_intArray(nelements) try: self.this.append(this) - except: + except __builtin__.Exception: self.this = this __swig_destroy__ = _pycbf.delete_intArray __del__ = lambda self: None @@ -183,9 +192,10 @@ def __setitem__(self, index, value): def cast(self): return _pycbf.intArray_cast(self) - __swig_getmethods__["frompointer"] = lambda x: _pycbf.intArray_frompointer if _newclass: frompointer = staticmethod(_pycbf.intArray_frompointer) + else: + frompointer = _pycbf.intArray_frompointer intArray_swigregister = _pycbf.intArray_swigregister intArray_swigregister(intArray) @@ -204,7 +214,7 @@ def __init__(self, nelements): this = _pycbf.new_shortArray(nelements) try: self.this.append(this) - except: + except __builtin__.Exception: self.this = this __swig_destroy__ = _pycbf.delete_shortArray __del__ = lambda self: None @@ -217,9 +227,10 @@ def __setitem__(self, index, value): def cast(self): return _pycbf.shortArray_cast(self) - __swig_getmethods__["frompointer"] = lambda x: _pycbf.shortArray_frompointer if _newclass: frompointer = staticmethod(_pycbf.shortArray_frompointer) + else: + frompointer = _pycbf.shortArray_frompointer shortArray_swigregister = _pycbf.shortArray_swigregister shortArray_swigregister(shortArray) @@ -238,7 +249,7 @@ def __init__(self, nelements): this = _pycbf.new_longArray(nelements) try: self.this.append(this) - except: + except __builtin__.Exception: self.this = this __swig_destroy__ = _pycbf.delete_longArray __del__ = lambda self: None @@ -251,9 +262,10 @@ def __setitem__(self, index, value): def cast(self): return _pycbf.longArray_cast(self) - __swig_getmethods__["frompointer"] = lambda x: _pycbf.longArray_frompointer if _newclass: frompointer = staticmethod(_pycbf.longArray_frompointer) + else: + frompointer = _pycbf.longArray_frompointer longArray_swigregister = _pycbf.longArray_swigregister longArray_swigregister(longArray) @@ -261,152 +273,54 @@ def longArray_frompointer(t): return _pycbf.longArray_frompointer(t) longArray_frompointer = _pycbf.longArray_frompointer - -_pycbf.CBF_INTEGER_swigconstant(_pycbf) CBF_INTEGER = _pycbf.CBF_INTEGER - -_pycbf.CBF_FLOAT_swigconstant(_pycbf) CBF_FLOAT = _pycbf.CBF_FLOAT - -_pycbf.CBF_CANONICAL_swigconstant(_pycbf) CBF_CANONICAL = _pycbf.CBF_CANONICAL - -_pycbf.CBF_PACKED_swigconstant(_pycbf) CBF_PACKED = _pycbf.CBF_PACKED - -_pycbf.CBF_PACKED_V2_swigconstant(_pycbf) CBF_PACKED_V2 = _pycbf.CBF_PACKED_V2 - -_pycbf.CBF_BYTE_OFFSET_swigconstant(_pycbf) CBF_BYTE_OFFSET = _pycbf.CBF_BYTE_OFFSET - -_pycbf.CBF_PREDICTOR_swigconstant(_pycbf) CBF_PREDICTOR = _pycbf.CBF_PREDICTOR - -_pycbf.CBF_NONE_swigconstant(_pycbf) CBF_NONE = _pycbf.CBF_NONE - -_pycbf.CBF_COMPRESSION_MASK_swigconstant(_pycbf) CBF_COMPRESSION_MASK = _pycbf.CBF_COMPRESSION_MASK - -_pycbf.CBF_FLAG_MASK_swigconstant(_pycbf) CBF_FLAG_MASK = _pycbf.CBF_FLAG_MASK - -_pycbf.CBF_UNCORRELATED_SECTIONS_swigconstant(_pycbf) CBF_UNCORRELATED_SECTIONS = _pycbf.CBF_UNCORRELATED_SECTIONS - -_pycbf.CBF_FLAT_IMAGE_swigconstant(_pycbf) CBF_FLAT_IMAGE = _pycbf.CBF_FLAT_IMAGE - -_pycbf.CBF_NO_EXPAND_swigconstant(_pycbf) CBF_NO_EXPAND = _pycbf.CBF_NO_EXPAND - -_pycbf.PLAIN_HEADERS_swigconstant(_pycbf) PLAIN_HEADERS = _pycbf.PLAIN_HEADERS - -_pycbf.MIME_HEADERS_swigconstant(_pycbf) MIME_HEADERS = _pycbf.MIME_HEADERS - -_pycbf.MSG_NODIGEST_swigconstant(_pycbf) MSG_NODIGEST = _pycbf.MSG_NODIGEST - -_pycbf.MSG_DIGEST_swigconstant(_pycbf) MSG_DIGEST = _pycbf.MSG_DIGEST - -_pycbf.MSG_DIGESTNOW_swigconstant(_pycbf) MSG_DIGESTNOW = _pycbf.MSG_DIGESTNOW - -_pycbf.MSG_DIGESTWARN_swigconstant(_pycbf) MSG_DIGESTWARN = _pycbf.MSG_DIGESTWARN - -_pycbf.PAD_1K_swigconstant(_pycbf) PAD_1K = _pycbf.PAD_1K - -_pycbf.PAD_2K_swigconstant(_pycbf) PAD_2K = _pycbf.PAD_2K - -_pycbf.PAD_4K_swigconstant(_pycbf) PAD_4K = _pycbf.PAD_4K - -_pycbf.CBF_PARSE_BRC_swigconstant(_pycbf) CBF_PARSE_BRC = _pycbf.CBF_PARSE_BRC - -_pycbf.CBF_PARSE_PRN_swigconstant(_pycbf) CBF_PARSE_PRN = _pycbf.CBF_PARSE_PRN - -_pycbf.CBF_PARSE_BKT_swigconstant(_pycbf) CBF_PARSE_BKT = _pycbf.CBF_PARSE_BKT - -_pycbf.CBF_PARSE_BRACKETS_swigconstant(_pycbf) CBF_PARSE_BRACKETS = _pycbf.CBF_PARSE_BRACKETS - -_pycbf.CBF_PARSE_TQ_swigconstant(_pycbf) CBF_PARSE_TQ = _pycbf.CBF_PARSE_TQ - -_pycbf.CBF_PARSE_CIF2_DELIMS_swigconstant(_pycbf) CBF_PARSE_CIF2_DELIMS = _pycbf.CBF_PARSE_CIF2_DELIMS - -_pycbf.CBF_PARSE_DDLm_swigconstant(_pycbf) CBF_PARSE_DDLm = _pycbf.CBF_PARSE_DDLm - -_pycbf.CBF_PARSE_CIF2_swigconstant(_pycbf) CBF_PARSE_CIF2 = _pycbf.CBF_PARSE_CIF2 - -_pycbf.CBF_PARSE_DEFINES_swigconstant(_pycbf) CBF_PARSE_DEFINES = _pycbf.CBF_PARSE_DEFINES - -_pycbf.CBF_PARSE_WIDE_swigconstant(_pycbf) CBF_PARSE_WIDE = _pycbf.CBF_PARSE_WIDE - -_pycbf.CBF_PARSE_UTF8_swigconstant(_pycbf) CBF_PARSE_UTF8 = _pycbf.CBF_PARSE_UTF8 - -_pycbf.HDR_DEFAULT_swigconstant(_pycbf) HDR_DEFAULT = _pycbf.HDR_DEFAULT - -_pycbf.MIME_NOHEADERS_swigconstant(_pycbf) MIME_NOHEADERS = _pycbf.MIME_NOHEADERS - -_pycbf.CBF_swigconstant(_pycbf) CBF = _pycbf.CBF - -_pycbf.CIF_swigconstant(_pycbf) CIF = _pycbf.CIF - -_pycbf.ENC_NONE_swigconstant(_pycbf) ENC_NONE = _pycbf.ENC_NONE - -_pycbf.ENC_BASE64_swigconstant(_pycbf) ENC_BASE64 = _pycbf.ENC_BASE64 - -_pycbf.ENC_BASE32K_swigconstant(_pycbf) ENC_BASE32K = _pycbf.ENC_BASE32K - -_pycbf.ENC_QP_swigconstant(_pycbf) ENC_QP = _pycbf.ENC_QP - -_pycbf.ENC_BASE10_swigconstant(_pycbf) ENC_BASE10 = _pycbf.ENC_BASE10 - -_pycbf.ENC_BASE16_swigconstant(_pycbf) ENC_BASE16 = _pycbf.ENC_BASE16 - -_pycbf.ENC_BASE8_swigconstant(_pycbf) ENC_BASE8 = _pycbf.ENC_BASE8 - -_pycbf.ENC_FORWARD_swigconstant(_pycbf) ENC_FORWARD = _pycbf.ENC_FORWARD - -_pycbf.ENC_BACKWARD_swigconstant(_pycbf) ENC_BACKWARD = _pycbf.ENC_BACKWARD - -_pycbf.ENC_CRTERM_swigconstant(_pycbf) ENC_CRTERM = _pycbf.ENC_CRTERM - -_pycbf.ENC_LFTERM_swigconstant(_pycbf) ENC_LFTERM = _pycbf.ENC_LFTERM - -_pycbf.ENC_DEFAULT_swigconstant(_pycbf) ENC_DEFAULT = _pycbf.ENC_DEFAULT def get_local_integer_byte_order(): @@ -656,7 +570,8 @@ def airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm): """ return _pycbf.airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm) class cbf_positioner_struct(_object): - """Proxy of C cbf_positioner_struct struct""" + """Proxy of C cbf_positioner_struct struct.""" + __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, cbf_positioner_struct, name, value) __swig_getmethods__ = {} @@ -692,7 +607,7 @@ def __init__(self): this = _pycbf.new_cbf_positioner_struct() try: self.this.append(this) - except: + except __builtin__.Exception: self.this = this __swig_destroy__ = _pycbf.delete_cbf_positioner_struct __del__ = lambda self: None @@ -898,7 +813,8 @@ def get_rotation_axis(self): cbf_positioner_struct_swigregister(cbf_positioner_struct) class cbf_detector_struct(_object): - """Proxy of C cbf_detector_struct struct""" + """Proxy of C cbf_detector_struct struct.""" + __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, cbf_detector_struct, name, value) __swig_getmethods__ = {} @@ -930,7 +846,7 @@ def __init__(self): this = _pycbf.new_cbf_detector_struct() try: self.this.append(this) - except: + except __builtin__.Exception: self.this = this __swig_destroy__ = _pycbf.delete_cbf_detector_struct __del__ = lambda self: None @@ -2135,29 +2051,16 @@ def get_pixel_normal(self, index1, index2): cbf_detector_struct_swigregister = _pycbf.cbf_detector_struct_swigregister cbf_detector_struct_swigregister(cbf_detector_struct) - -_pycbf.CBF_UNDEFNODE_swigconstant(_pycbf) CBF_UNDEFNODE = _pycbf.CBF_UNDEFNODE - -_pycbf.CBF_LINK_swigconstant(_pycbf) CBF_LINK = _pycbf.CBF_LINK - -_pycbf.CBF_ROOT_swigconstant(_pycbf) CBF_ROOT = _pycbf.CBF_ROOT - -_pycbf.CBF_DATABLOCK_swigconstant(_pycbf) CBF_DATABLOCK = _pycbf.CBF_DATABLOCK - -_pycbf.CBF_SAVEFRAME_swigconstant(_pycbf) CBF_SAVEFRAME = _pycbf.CBF_SAVEFRAME - -_pycbf.CBF_CATEGORY_swigconstant(_pycbf) CBF_CATEGORY = _pycbf.CBF_CATEGORY - -_pycbf.CBF_COLUMN_swigconstant(_pycbf) CBF_COLUMN = _pycbf.CBF_COLUMN class cbf_handle_struct(_object): - """Proxy of C cbf_handle_struct struct""" + """Proxy of C cbf_handle_struct struct.""" + __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, cbf_handle_struct, name, value) __swig_getmethods__ = {} @@ -2181,7 +2084,7 @@ def __init__(self): this = _pycbf.new_cbf_handle_struct() try: self.this.append(this) - except: + except __builtin__.Exception: self.this = this __swig_destroy__ = _pycbf.delete_cbf_handle_struct __del__ = lambda self: None diff --git a/pycbf/pycbf_wrap.c b/pycbf/pycbf_wrap.c index ce46f060..def63d1f 100644 --- a/pycbf/pycbf_wrap.c +++ b/pycbf/pycbf_wrap.c @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.7 + * Version 3.0.10 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -8,7 +8,11 @@ * interface file instead. * ----------------------------------------------------------------------------- */ + +#ifndef SWIGPYTHON #define SWIGPYTHON +#endif + #define SWIG_PYTHON_DIRECTOR_NO_VTABLE /* ----------------------------------------------------------------------------- @@ -78,9 +82,11 @@ #endif /* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif # endif #endif @@ -640,16 +646,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { char d = *(c++); unsigned char uu; if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); + uu = (unsigned char)((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); + uu = (unsigned char)((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); + uu |= (unsigned char)(d - '0'); else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); + uu |= (unsigned char)(d - ('a'-10)); else return (char *) 0; *u = uu; @@ -832,10 +838,6 @@ PyString_FromFormat(const char *fmt, ...) { } #endif -/* Add PyObject_Del for old Pythons */ -#if PY_VERSION_HEX < 0x01060000 -# define PyObject_Del(op) PyMem_DEL((op)) -#endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif @@ -1301,7 +1303,7 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { /* Unpack the argument tuple */ -SWIGINTERN int +SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { @@ -1315,7 +1317,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi } if (!PyTuple_Check(args)) { if (min <= 1 && max >= 1) { - int i; + Py_ssize_t i; objs[0] = args; for (i = 1; i < max; ++i) { objs[i] = 0; @@ -1335,7 +1337,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { - int i; + Py_ssize_t i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } @@ -1676,16 +1678,32 @@ SwigPyObject_dealloc(PyObject *v) if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; + + /* PyObject_CallFunction() has the potential to silently drop + the active active exception. In cases of unnamed temporary + variable or where we just finished iterating over a generator + StopIteration will be active right now, and this needs to + remain true upon return from SwigPyObject_dealloc. So save + and restore. */ + + PyObject *val = NULL, *type = NULL, *tb = NULL; + PyErr_Fetch(&val, &type, &tb); + if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); + /* we need to create a temporary object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); } + if (!res) + PyErr_WriteUnraisable(destroy); + + PyErr_Restore(val, type, tb); + Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) @@ -1709,6 +1727,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) next = tmp; #endif if (!SwigPyObject_Check(next)) { + PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); return NULL; } sobj->next = next; @@ -1864,7 +1883,9 @@ SwigPyObject_TypeOnce(void) { (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ +#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ +#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ @@ -1944,10 +1965,19 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ #endif #ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ #endif }; swigpyobject_type = tmp; @@ -2123,10 +2153,19 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ #endif #ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ #endif }; swigpypacked_type = tmp; @@ -2654,13 +2693,11 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs module as first arg"); + PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs non-NULL value"); + PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } @@ -2988,7 +3025,7 @@ static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0}; #endif #define SWIG_name "_pycbf" -#define SWIGVERSION 0x030007 +#define SWIGVERSION 0x030010 #define SWIG_VERSION SWIGVERSION @@ -3006,9 +3043,11 @@ SWIG_AsVal_double (PyObject *obj, double *val) if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; +#if PY_VERSION_HEX < 0x03000000 } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; +#endif } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { @@ -3100,18 +3139,7 @@ SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) return SWIG_OK; } else { PyErr_Clear(); -#if PY_VERSION_HEX >= 0x03000000 - { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (v < 0) { - return SWIG_OverflowError; - } - } else { - PyErr_Clear(); - } - } -#endif + return SWIG_OverflowError; } } #ifdef SWIG_PYTHON_CAST_MODE @@ -3138,12 +3166,77 @@ SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) } +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + SWIGINTERNINLINE int SWIG_AsVal_size_t (PyObject * obj, size_t *val) { - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = (size_t)(v); + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); + } +#endif return res; } @@ -3188,29 +3281,23 @@ SWIGINTERNINLINE PyObject* } -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { +#if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; - } else if (PyLong_Check(obj)) { + } else +#endif + if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); + return SWIG_OverflowError; } } #ifdef SWIG_PYTHON_CAST_MODE @@ -3274,7 +3361,7 @@ SWIGINTERN short shortArray___getitem__(shortArray *self,size_t index){ return self[index]; } - #define SWIG_From_long PyLong_FromLong + #define SWIG_From_long PyInt_FromLong SWIGINTERNINLINE PyObject * @@ -3496,13 +3583,17 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size)); +#else #if PY_VERSION_HEX >= 0x03010000 - return PyUnicode_DecodeUTF8(carray, (int)(size), "surrogateescape"); + return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape"); #else - return PyUnicode_FromStringAndSize(carray, (int)(size)); + return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size)); +#endif #endif #else - return PyString_FromStringAndSize(carray, (int)(size)); + return PyString_FromStringAndSize(carray, (Py_ssize_t)(size)); #endif } } else { @@ -3567,14 +3658,33 @@ SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { return (value > LONG_MAX) ? - PyLong_FromUnsignedLong(value) : PyLong_FromLong((long)(value)); + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); } +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)(value)); +} +#endif + + SWIGINTERNINLINE PyObject * SWIG_From_size_t (size_t value) { - return SWIG_From_unsigned_SS_long ((unsigned long)(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + return SWIG_From_unsigned_SS_long ((unsigned long)(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(size_t) <= sizeof(unsigned long long) */ + return SWIG_From_unsigned_SS_long_SS_long ((unsigned long long)(value)); + } +#endif } SWIGINTERN cbf_positioner_struct *new_cbf_positioner_struct(void){ // Constructor @@ -3805,13 +3915,18 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_Check(obj)) +#else if (PyUnicode_Check(obj)) +#endif #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 +#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require @@ -3820,8 +3935,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); - PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; +#endif + PyBytes_AsStringAndSize(obj, &cstr, &len); #else PyString_AsStringAndSize(obj, &cstr, &len); #endif @@ -3841,27 +3957,58 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) #else if (*alloc == SWIG_NEWOBJ) #endif - { - *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); - *alloc = SWIG_NEWOBJ; - } - else { + { + *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + *alloc = SWIG_NEWOBJ; + } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { - #if PY_VERSION_HEX>=0x03000000 - assert(0); /* Should never reach here in Python 3 */ - #endif +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + *cptr = PyBytes_AsString(obj); +#else + assert(0); /* Should never reach here with Unicode strings in Python 3 */ +#endif +#else *cptr = SWIG_Python_str_AsChar(obj); +#endif } } if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 +#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) Py_XDECREF(obj); #endif return SWIG_OK; } else { +#if defined(SWIG_PYTHON_2_UNICODE) +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) +#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" +#endif +#if PY_VERSION_HEX<0x03000000 + if (PyUnicode_Check(obj)) { + char *cstr; Py_ssize_t len; + if (!alloc && cptr) { + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { + if (cptr) { + if (alloc) *alloc = SWIG_NEWOBJ; + *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + } + if (psize) *psize = len + 1; + + Py_XDECREF(obj); + return SWIG_OK; + } else { + Py_XDECREF(obj); + } + } +#endif +#endif + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; @@ -6002,545 +6149,6 @@ SWIGINTERN PyObject *longArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyOb return SWIG_Py_Void(); } -SWIGINTERN PyObject *CBF_INTEGER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_INTEGER",SWIG_From_int((int)(0x0010))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_FLOAT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_FLOAT",SWIG_From_int((int)(0x0020))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_CANONICAL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_CANONICAL",SWIG_From_int((int)(0x0050))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PACKED_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PACKED",SWIG_From_int((int)(0x0060))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PACKED_V2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PACKED_V2",SWIG_From_int((int)(0x0090))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_BYTE_OFFSET_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_BYTE_OFFSET",SWIG_From_int((int)(0x0070))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PREDICTOR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PREDICTOR",SWIG_From_int((int)(0x0080))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_NONE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_NONE",SWIG_From_int((int)(0x0040))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_COMPRESSION_MASK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_COMPRESSION_MASK",SWIG_From_int((int)(0x00FF))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_FLAG_MASK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_FLAG_MASK",SWIG_From_int((int)(0x0F00))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_UNCORRELATED_SECTIONS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_UNCORRELATED_SECTIONS",SWIG_From_int((int)(0x0100))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_FLAT_IMAGE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_FLAT_IMAGE",SWIG_From_int((int)(0x0200))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_NO_EXPAND_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_NO_EXPAND",SWIG_From_int((int)(0x0400))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *PLAIN_HEADERS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "PLAIN_HEADERS",SWIG_From_int((int)(0x0001))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *MIME_HEADERS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "MIME_HEADERS",SWIG_From_int((int)(0x0002))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *MSG_NODIGEST_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "MSG_NODIGEST",SWIG_From_int((int)(0x0004))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *MSG_DIGEST_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "MSG_DIGEST",SWIG_From_int((int)(0x0008))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *MSG_DIGESTNOW_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "MSG_DIGESTNOW",SWIG_From_int((int)(0x0010))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *MSG_DIGESTWARN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "MSG_DIGESTWARN",SWIG_From_int((int)(0x0020))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *PAD_1K_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "PAD_1K",SWIG_From_int((int)(0x0020))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *PAD_2K_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "PAD_2K",SWIG_From_int((int)(0x0040))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *PAD_4K_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "PAD_4K",SWIG_From_int((int)(0x0080))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_BRC_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_BRC",SWIG_From_int((int)(0x0100))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_PRN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_PRN",SWIG_From_int((int)(0x0200))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_BKT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_BKT",SWIG_From_int((int)(0x0400))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_BRACKETS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_BRACKETS",SWIG_From_int((int)(0x0700))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_TQ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_TQ",SWIG_From_int((int)(0x0800))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_CIF2_DELIMS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_CIF2_DELIMS",SWIG_From_int((int)(0x1000))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_DDLm_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_DDLm",SWIG_From_int((int)(0x0700))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_CIF2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_CIF2",SWIG_From_int((int)(0x1F00))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_DEFINES_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_DEFINES",SWIG_From_int((int)(0x2000))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_WIDE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_WIDE",SWIG_From_int((int)(0x4000))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_PARSE_UTF8_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_PARSE_UTF8",SWIG_From_int((int)(0x10000))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *HDR_DEFAULT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "HDR_DEFAULT",SWIG_From_int((int)((0x0002|0x0004)))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *MIME_NOHEADERS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "MIME_NOHEADERS",SWIG_From_int((int)(0x0001))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF",SWIG_From_int((int)(0x0000))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CIF_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CIF",SWIG_From_int((int)(0x0001))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_NONE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_NONE",SWIG_From_int((int)(0x0001))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_BASE64_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_BASE64",SWIG_From_int((int)(0x0002))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_BASE32K_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_BASE32K",SWIG_From_int((int)(0x0004))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_QP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_QP",SWIG_From_int((int)(0x0008))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_BASE10_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_BASE10",SWIG_From_int((int)(0x0010))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_BASE16_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_BASE16",SWIG_From_int((int)(0x0020))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_BASE8_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_BASE8",SWIG_From_int((int)(0x0040))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_FORWARD_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_FORWARD",SWIG_From_int((int)(0x0080))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_BACKWARD_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_BACKWARD",SWIG_From_int((int)(0x0100))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_CRTERM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_CRTERM",SWIG_From_int((int)(0x0200))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_LFTERM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_LFTERM",SWIG_From_int((int)(0x0400))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *ENC_DEFAULT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "ENC_DEFAULT",SWIG_From_int((int)((0x0002|0x0400|0x0080)))); - return SWIG_Py_Void(); -} - - SWIGINTERN PyObject *_wrap_get_local_integer_byte_order(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char **arg1 = (char **) 0 ; @@ -9943,83 +9551,6 @@ SWIGINTERN PyObject *cbf_detector_struct_swigregister(PyObject *SWIGUNUSEDPARM(s return SWIG_Py_Void(); } -SWIGINTERN PyObject *CBF_UNDEFNODE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_UNDEFNODE",SWIG_From_int((int)(CBF_UNDEFNODE))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_LINK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_LINK",SWIG_From_int((int)(CBF_LINK))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_ROOT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_ROOT",SWIG_From_int((int)(CBF_ROOT))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_DATABLOCK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_DATABLOCK",SWIG_From_int((int)(CBF_DATABLOCK))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_SAVEFRAME_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_SAVEFRAME",SWIG_From_int((int)(CBF_SAVEFRAME))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_CATEGORY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_CATEGORY",SWIG_From_int((int)(CBF_CATEGORY))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *CBF_COLUMN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "CBF_COLUMN",SWIG_From_int((int)(CBF_COLUMN))); - return SWIG_Py_Void(); -} - - SWIGINTERN PyObject *_wrap_cbf_handle_struct_node_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; @@ -21374,55 +20905,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"longArray_cast", _wrap_longArray_cast, METH_VARARGS, NULL}, { (char *)"longArray_frompointer", _wrap_longArray_frompointer, METH_VARARGS, NULL}, { (char *)"longArray_swigregister", longArray_swigregister, METH_VARARGS, NULL}, - { (char *)"CBF_INTEGER_swigconstant", CBF_INTEGER_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_FLOAT_swigconstant", CBF_FLOAT_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_CANONICAL_swigconstant", CBF_CANONICAL_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PACKED_swigconstant", CBF_PACKED_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PACKED_V2_swigconstant", CBF_PACKED_V2_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_BYTE_OFFSET_swigconstant", CBF_BYTE_OFFSET_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PREDICTOR_swigconstant", CBF_PREDICTOR_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_NONE_swigconstant", CBF_NONE_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_COMPRESSION_MASK_swigconstant", CBF_COMPRESSION_MASK_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_FLAG_MASK_swigconstant", CBF_FLAG_MASK_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_UNCORRELATED_SECTIONS_swigconstant", CBF_UNCORRELATED_SECTIONS_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_FLAT_IMAGE_swigconstant", CBF_FLAT_IMAGE_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_NO_EXPAND_swigconstant", CBF_NO_EXPAND_swigconstant, METH_VARARGS, NULL}, - { (char *)"PLAIN_HEADERS_swigconstant", PLAIN_HEADERS_swigconstant, METH_VARARGS, NULL}, - { (char *)"MIME_HEADERS_swigconstant", MIME_HEADERS_swigconstant, METH_VARARGS, NULL}, - { (char *)"MSG_NODIGEST_swigconstant", MSG_NODIGEST_swigconstant, METH_VARARGS, NULL}, - { (char *)"MSG_DIGEST_swigconstant", MSG_DIGEST_swigconstant, METH_VARARGS, NULL}, - { (char *)"MSG_DIGESTNOW_swigconstant", MSG_DIGESTNOW_swigconstant, METH_VARARGS, NULL}, - { (char *)"MSG_DIGESTWARN_swigconstant", MSG_DIGESTWARN_swigconstant, METH_VARARGS, NULL}, - { (char *)"PAD_1K_swigconstant", PAD_1K_swigconstant, METH_VARARGS, NULL}, - { (char *)"PAD_2K_swigconstant", PAD_2K_swigconstant, METH_VARARGS, NULL}, - { (char *)"PAD_4K_swigconstant", PAD_4K_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_BRC_swigconstant", CBF_PARSE_BRC_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_PRN_swigconstant", CBF_PARSE_PRN_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_BKT_swigconstant", CBF_PARSE_BKT_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_BRACKETS_swigconstant", CBF_PARSE_BRACKETS_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_TQ_swigconstant", CBF_PARSE_TQ_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_CIF2_DELIMS_swigconstant", CBF_PARSE_CIF2_DELIMS_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_DDLm_swigconstant", CBF_PARSE_DDLm_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_CIF2_swigconstant", CBF_PARSE_CIF2_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_DEFINES_swigconstant", CBF_PARSE_DEFINES_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_WIDE_swigconstant", CBF_PARSE_WIDE_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_PARSE_UTF8_swigconstant", CBF_PARSE_UTF8_swigconstant, METH_VARARGS, NULL}, - { (char *)"HDR_DEFAULT_swigconstant", HDR_DEFAULT_swigconstant, METH_VARARGS, NULL}, - { (char *)"MIME_NOHEADERS_swigconstant", MIME_NOHEADERS_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_swigconstant", CBF_swigconstant, METH_VARARGS, NULL}, - { (char *)"CIF_swigconstant", CIF_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_NONE_swigconstant", ENC_NONE_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_BASE64_swigconstant", ENC_BASE64_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_BASE32K_swigconstant", ENC_BASE32K_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_QP_swigconstant", ENC_QP_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_BASE10_swigconstant", ENC_BASE10_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_BASE16_swigconstant", ENC_BASE16_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_BASE8_swigconstant", ENC_BASE8_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_FORWARD_swigconstant", ENC_FORWARD_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_BACKWARD_swigconstant", ENC_BACKWARD_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_CRTERM_swigconstant", ENC_CRTERM_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_LFTERM_swigconstant", ENC_LFTERM_swigconstant, METH_VARARGS, NULL}, - { (char *)"ENC_DEFAULT_swigconstant", ENC_DEFAULT_swigconstant, METH_VARARGS, NULL}, { (char *)"get_local_integer_byte_order", _wrap_get_local_integer_byte_order, METH_VARARGS, (char *)"\n" "\n" "Returns : char **bo,int *bolen\n" @@ -22941,13 +22423,6 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { (char *)"cbf_detector_struct_swigregister", cbf_detector_struct_swigregister, METH_VARARGS, NULL}, - { (char *)"CBF_UNDEFNODE_swigconstant", CBF_UNDEFNODE_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_LINK_swigconstant", CBF_LINK_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_ROOT_swigconstant", CBF_ROOT_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_DATABLOCK_swigconstant", CBF_DATABLOCK_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_SAVEFRAME_swigconstant", CBF_SAVEFRAME_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_CATEGORY_swigconstant", CBF_CATEGORY_swigconstant, METH_VARARGS, NULL}, - { (char *)"CBF_COLUMN_swigconstant", CBF_COLUMN_swigconstant, METH_VARARGS, NULL}, { (char *)"cbf_handle_struct_node_set", _wrap_cbf_handle_struct_node_set, METH_VARARGS, (char *)"cbf_handle_struct_node_set(cbf_handle_struct self, cbf_node * node)"}, { (char *)"cbf_handle_struct_node_get", _wrap_cbf_handle_struct_node_get, METH_VARARGS, (char *)"cbf_handle_struct_node_get(cbf_handle_struct self) -> cbf_node *"}, { (char *)"cbf_handle_struct_row_set", _wrap_cbf_handle_struct_row_set, METH_VARARGS, (char *)"cbf_handle_struct_row_set(cbf_handle_struct self, int row)"}, @@ -29889,10 +29364,19 @@ extern "C" { 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ #endif #ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ #endif }; varlink_type = tmp; @@ -30157,6 +29641,62 @@ SWIG_init(void) { SWIG_InstallConstants(d,swig_const_table); + SWIG_Python_SetConstant(d, "CBF_INTEGER",SWIG_From_int((int)(0x0010))); + SWIG_Python_SetConstant(d, "CBF_FLOAT",SWIG_From_int((int)(0x0020))); + SWIG_Python_SetConstant(d, "CBF_CANONICAL",SWIG_From_int((int)(0x0050))); + SWIG_Python_SetConstant(d, "CBF_PACKED",SWIG_From_int((int)(0x0060))); + SWIG_Python_SetConstant(d, "CBF_PACKED_V2",SWIG_From_int((int)(0x0090))); + SWIG_Python_SetConstant(d, "CBF_BYTE_OFFSET",SWIG_From_int((int)(0x0070))); + SWIG_Python_SetConstant(d, "CBF_PREDICTOR",SWIG_From_int((int)(0x0080))); + SWIG_Python_SetConstant(d, "CBF_NONE",SWIG_From_int((int)(0x0040))); + SWIG_Python_SetConstant(d, "CBF_COMPRESSION_MASK",SWIG_From_int((int)(0x00FF))); + SWIG_Python_SetConstant(d, "CBF_FLAG_MASK",SWIG_From_int((int)(0x0F00))); + SWIG_Python_SetConstant(d, "CBF_UNCORRELATED_SECTIONS",SWIG_From_int((int)(0x0100))); + SWIG_Python_SetConstant(d, "CBF_FLAT_IMAGE",SWIG_From_int((int)(0x0200))); + SWIG_Python_SetConstant(d, "CBF_NO_EXPAND",SWIG_From_int((int)(0x0400))); + SWIG_Python_SetConstant(d, "PLAIN_HEADERS",SWIG_From_int((int)(0x0001))); + SWIG_Python_SetConstant(d, "MIME_HEADERS",SWIG_From_int((int)(0x0002))); + SWIG_Python_SetConstant(d, "MSG_NODIGEST",SWIG_From_int((int)(0x0004))); + SWIG_Python_SetConstant(d, "MSG_DIGEST",SWIG_From_int((int)(0x0008))); + SWIG_Python_SetConstant(d, "MSG_DIGESTNOW",SWIG_From_int((int)(0x0010))); + SWIG_Python_SetConstant(d, "MSG_DIGESTWARN",SWIG_From_int((int)(0x0020))); + SWIG_Python_SetConstant(d, "PAD_1K",SWIG_From_int((int)(0x0020))); + SWIG_Python_SetConstant(d, "PAD_2K",SWIG_From_int((int)(0x0040))); + SWIG_Python_SetConstant(d, "PAD_4K",SWIG_From_int((int)(0x0080))); + SWIG_Python_SetConstant(d, "CBF_PARSE_BRC",SWIG_From_int((int)(0x0100))); + SWIG_Python_SetConstant(d, "CBF_PARSE_PRN",SWIG_From_int((int)(0x0200))); + SWIG_Python_SetConstant(d, "CBF_PARSE_BKT",SWIG_From_int((int)(0x0400))); + SWIG_Python_SetConstant(d, "CBF_PARSE_BRACKETS",SWIG_From_int((int)(0x0700))); + SWIG_Python_SetConstant(d, "CBF_PARSE_TQ",SWIG_From_int((int)(0x0800))); + SWIG_Python_SetConstant(d, "CBF_PARSE_CIF2_DELIMS",SWIG_From_int((int)(0x1000))); + SWIG_Python_SetConstant(d, "CBF_PARSE_DDLm",SWIG_From_int((int)(0x0700))); + SWIG_Python_SetConstant(d, "CBF_PARSE_CIF2",SWIG_From_int((int)(0x1F00))); + SWIG_Python_SetConstant(d, "CBF_PARSE_DEFINES",SWIG_From_int((int)(0x2000))); + SWIG_Python_SetConstant(d, "CBF_PARSE_WIDE",SWIG_From_int((int)(0x4000))); + SWIG_Python_SetConstant(d, "CBF_PARSE_UTF8",SWIG_From_int((int)(0x10000))); + SWIG_Python_SetConstant(d, "HDR_DEFAULT",SWIG_From_int((int)((0x0002|0x0004)))); + SWIG_Python_SetConstant(d, "MIME_NOHEADERS",SWIG_From_int((int)(0x0001))); + SWIG_Python_SetConstant(d, "CBF",SWIG_From_int((int)(0x0000))); + SWIG_Python_SetConstant(d, "CIF",SWIG_From_int((int)(0x0001))); + SWIG_Python_SetConstant(d, "ENC_NONE",SWIG_From_int((int)(0x0001))); + SWIG_Python_SetConstant(d, "ENC_BASE64",SWIG_From_int((int)(0x0002))); + SWIG_Python_SetConstant(d, "ENC_BASE32K",SWIG_From_int((int)(0x0004))); + SWIG_Python_SetConstant(d, "ENC_QP",SWIG_From_int((int)(0x0008))); + SWIG_Python_SetConstant(d, "ENC_BASE10",SWIG_From_int((int)(0x0010))); + SWIG_Python_SetConstant(d, "ENC_BASE16",SWIG_From_int((int)(0x0020))); + SWIG_Python_SetConstant(d, "ENC_BASE8",SWIG_From_int((int)(0x0040))); + SWIG_Python_SetConstant(d, "ENC_FORWARD",SWIG_From_int((int)(0x0080))); + SWIG_Python_SetConstant(d, "ENC_BACKWARD",SWIG_From_int((int)(0x0100))); + SWIG_Python_SetConstant(d, "ENC_CRTERM",SWIG_From_int((int)(0x0200))); + SWIG_Python_SetConstant(d, "ENC_LFTERM",SWIG_From_int((int)(0x0400))); + SWIG_Python_SetConstant(d, "ENC_DEFAULT",SWIG_From_int((int)((0x0002|0x0400|0x0080)))); + SWIG_Python_SetConstant(d, "CBF_UNDEFNODE",SWIG_From_int((int)(CBF_UNDEFNODE))); + SWIG_Python_SetConstant(d, "CBF_LINK",SWIG_From_int((int)(CBF_LINK))); + SWIG_Python_SetConstant(d, "CBF_ROOT",SWIG_From_int((int)(CBF_ROOT))); + SWIG_Python_SetConstant(d, "CBF_DATABLOCK",SWIG_From_int((int)(CBF_DATABLOCK))); + SWIG_Python_SetConstant(d, "CBF_SAVEFRAME",SWIG_From_int((int)(CBF_SAVEFRAME))); + SWIG_Python_SetConstant(d, "CBF_CATEGORY",SWIG_From_int((int)(CBF_CATEGORY))); + SWIG_Python_SetConstant(d, "CBF_COLUMN",SWIG_From_int((int)(CBF_COLUMN))); #if PY_VERSION_HEX >= 0x03000000 return m; #else diff --git a/src/cbf_copy.c b/src/cbf_copy.c index 36b3a822..cde869b5 100644 --- a/src/cbf_copy.c +++ b/src/cbf_copy.c @@ -1574,10 +1574,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /* if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((signed char *)narray)[icount] = (signed char)valtemp; } @@ -1588,10 +1588,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned char *)narray)[icount] = (unsigned char)valtemp; } @@ -1606,10 +1606,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /* if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((signed char *)narray)[icount] = (signed char)valtemp; } @@ -1620,10 +1620,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned char *)narray)[icount] = (unsigned char)valtemp; } @@ -1643,10 +1643,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((signed short int *)narray)[icount] = (signed short int)valtemp; } @@ -1657,10 +1657,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned short int *)narray)[icount] = (unsigned short int)valtemp; } @@ -1675,10 +1675,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((signed short int *)narray)[icount] = (signed short int)valtemp; } @@ -1689,10 +1689,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned short int *)narray)[icount] = (unsigned short int)valtemp; } @@ -1711,10 +1711,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((signed int *)narray)[icount] = (signed int)valtemp; } @@ -1725,10 +1725,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned int *)narray)[icount] = (unsigned int)valtemp; } @@ -1743,10 +1743,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((signed int *)narray)[icount] = (signed int)valtemp; } @@ -1757,10 +1757,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned int *)narray)[icount] = (unsigned int)valtemp; } @@ -1780,10 +1780,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((signed long int *)narray)[icount] = (signed long int)valtemp; } @@ -1794,10 +1794,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned long int *)narray)[icount] = (unsigned long int)valtemp; } @@ -1812,10 +1812,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((signed long int *)narray)[icount] = (signed long int)valtemp; } @@ -1826,10 +1826,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned long int *)narray)[icount] = (unsigned long int)valtemp; } @@ -1850,10 +1850,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }* ((signed long long int *)narray)[icount] = (signed long long int)valtemp; } @@ -1864,10 +1864,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned long long int *)narray)[icount] = (unsigned long long int)valtemp; } @@ -1882,10 +1882,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((signed long long int *)narray)[icount] = (signed long long int)valtemp; } @@ -1896,10 +1896,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ ((unsigned long long int *)narray)[icount] = (unsigned long long int)valtemp; } @@ -1934,10 +1934,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ vallow = fmod(valtemp,onemore); @@ -1955,10 +1955,10 @@ extern "C" { valtemp = ((float *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ vallow = fmod(valtemp,onemore); @@ -1980,10 +1980,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ vallow = fmod(valtemp,onemore); @@ -2000,10 +2000,10 @@ extern "C" { valtemp = ((double *)array)[icount]; - if (valtemp < minval || valtemp > maxval) { + /*if (valtemp < minval || valtemp > maxval) { free(array); free(narray); return CBF_OVERFLOW; - } + }*/ vallow = fmod(valtemp,onemore);