aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormusil <tmusil@users.sourceforge.net>2012-09-11 11:57:21 +0000
committermusil <tmusil@users.sourceforge.net>2012-09-11 11:57:21 +0000
commit315cd057c7ee19e06d10dd9b64c10896c04b4bf5 (patch)
tree55e3eebb40a8c29f63e9abd8e98efcd306e5fc1d
parenta2fdf361a7cb4498921d4f1a83ac4b25eb203155 (diff)
better #if for iemarray_getarray()
svn path=/trunk/externals/iemlib/; revision=16205
-rw-r--r--iem_t3_lib/src/iemlib.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/iem_t3_lib/src/iemlib.h b/iem_t3_lib/src/iemlib.h
index 973bfeb..a4c0e12 100644
--- a/iem_t3_lib/src/iemlib.h
+++ b/iem_t3_lib/src/iemlib.h
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
+iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2011 */
#ifndef __IEMLIB_H__
#define __IEMLIB_H__
@@ -99,4 +99,17 @@ union tabfudge_f
#endif
+/* on 64bit systems we cannot use garray_getfloatarray... */
+#if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 40)
+# define iemarray_t t_word
+# define iemarray_getarray garray_getfloatwords
+# define iemarray_getfloat(pointer, index) (pointer[index].w_float)
+# define iemarray_setfloat(pointer, index, fvalue) (pointer[index].w_float = fvalue)
+#else
+# define iemarray_t t_float
+# define iemarray_getarray garray_getfloatarray
+# define iemarray_getfloat(pointer, index) (pointer[index])
+# define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue)
+#endif
+
#endif