Revision: 10529 http://pure-data.svn.sourceforge.net/pure-data/?rev=10529&view=rev Author: zmoelnig Date: 2009-01-13 16:40:12 +0000 (Tue, 13 Jan 2009)
Log Message: ----------- made array-access 64bit compatible
Modified Paths: -------------- trunk/externals/zexy/src/tabdump.c trunk/externals/zexy/src/tabminmax.c trunk/externals/zexy/src/tabread4~~.c trunk/externals/zexy/src/tabset.c trunk/externals/zexy/src/zexy.h
Modified: trunk/externals/zexy/src/tabdump.c =================================================================== --- trunk/externals/zexy/src/tabdump.c 2009-01-13 15:59:14 UTC (rev 10528) +++ trunk/externals/zexy/src/tabdump.c 2009-01-13 16:40:12 UTC (rev 10529) @@ -36,11 +36,11 @@ { t_garray *A; int npoints; - t_float *vec; + zarray_t *vec;
if (!(A = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) error("%s: no such array", x->x_arrayname->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!zarray_getarray(A, &npoints, &vec)) error("%s: bad template for tabdump", x->x_arrayname->s_name); else {
Modified: trunk/externals/zexy/src/tabminmax.c =================================================================== --- trunk/externals/zexy/src/tabminmax.c 2009-01-13 15:59:14 UTC (rev 10528) +++ trunk/externals/zexy/src/tabminmax.c 2009-01-13 16:40:12 UTC (rev 10529) @@ -35,11 +35,11 @@ { t_garray *A; int npoints; - t_float *vec; + zarray_t *vec;
if (!(A = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) error("%s: no such array", x->x_arrayname->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!zarray_getarray(A, &npoints, &vec)) error("%s: bad template for tabminmax", x->x_arrayname->s_name); else {
Modified: trunk/externals/zexy/src/tabread4~~.c =================================================================== --- trunk/externals/zexy/src/tabread4~~.c 2009-01-13 15:59:14 UTC (rev 10528) +++ trunk/externals/zexy/src/tabread4~~.c 2009-01-13 16:40:12 UTC (rev 10529) @@ -23,17 +23,6 @@
static t_class *tabread4_tilde_class;
-#ifdef Z_USE_WORD_ARRAYS -# define zarray_t t_word -# define zarray_getarray garray_getfloatwords -# define zarray_getfloat(pointer, index) (pointer[index].w_float) -#else -# define zarray_t t_float -# define zarray_getarray garray_getfloatarray -# define zarray_getfloat(pointer, index) (pointer[index]) -#endif - - typedef struct _tabread4_tilde { t_object x_obj;
Modified: trunk/externals/zexy/src/tabset.c =================================================================== --- trunk/externals/zexy/src/tabset.c 2009-01-13 15:59:14 UTC (rev 10528) +++ trunk/externals/zexy/src/tabset.c 2009-01-13 16:40:12 UTC (rev 10529) @@ -33,11 +33,11 @@ { t_garray *A; int npoints; - t_float *vec; + zarray_t *vec;
if (!(A = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) error("%s: no such array", x->x_arrayname->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!zarray_getarray(A, &npoints, &vec)) error("%s: bad template for tabset", x->x_arrayname->s_name); else { while(npoints--)*vec++=f; @@ -49,12 +49,12 @@ { t_garray *A; int npoints; - t_float *vec; + zarray_t *vec; ZEXY_USEVAR(s);
if (!(A = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) error("%s: no such array", x->x_arrayname->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!zarray_getarray(A, &npoints, &vec)) error("%s: bad template for tabset", x->x_arrayname->s_name); else { if (argc>=npoints)
Modified: trunk/externals/zexy/src/zexy.h =================================================================== --- trunk/externals/zexy/src/zexy.h 2009-01-13 15:59:14 UTC (rev 10528) +++ trunk/externals/zexy/src/zexy.h 2009-01-13 16:40:12 UTC (rev 10529) @@ -140,5 +140,15 @@ # define z_verbose #endif
+#if (defined __x86_64__) && (defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 41) +# define zarray_t t_word +# define zarray_getarray garray_getfloatwords +# define zarray_getfloat(pointer, index) (pointer[index].w_float) +#else +# define zarray_t t_float +# define zarray_getarray garray_getfloatarray +# define zarray_getfloat(pointer, index) (pointer[index]) +#endif
+ #endif /* INCLUDE_ZEXY_H__ */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.