From 982d9823a3f4978b211841adff80c9bc6166c4e9 Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Sun, 22 Oct 2006 21:46:11 +0000 Subject: test release for 0.41 (bug fixes for IA64). svn path=/trunk/; revision=6154 --- pd/src/g_array.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'pd/src/g_array.c') diff --git a/pd/src/g_array.c b/pd/src/g_array.c index 95819282..1b44e548 100644 --- a/pd/src/g_array.c +++ b/pd/src/g_array.c @@ -1130,7 +1130,7 @@ char *garray_vec(t_garray *x) /* get the contents */ /* routine that checks if we're just an array of floats and if so returns the goods */ -int garray_getfloatarray(t_garray *x, int *size, t_float **vec) +int garray_getfloatwords(t_garray *x, int *size, t_word **vec) { int yonset, type, elemsize; t_array *a = garray_getarray_floatonly(x, &yonset, &elemsize); @@ -1145,9 +1145,23 @@ int garray_getfloatarray(t_garray *x, int *size, t_float **vec) return (0); } *size = garray_npoints(x); - *vec = (float *)garray_vec(x); + *vec = (t_word *)garray_vec(x); return (1); } + /* older, non-64-bit safe version, supplied for older externs */ + +int garray_getfloatarray(t_garray *x, int *size, t_float **vec) +{ + if (sizeof(t_word) != sizeof(float)) + { + static int warned; + if (!warned) + post( + "warning: extern using garray_getfloatarray() won't work in 64-bit version"); + warned = 1; + } + return (garray_getfloatwords(x, size, (t_word **)vec)); +} /* set the "saveit" flag */ void garray_setsaveit(t_garray *x, int saveit) -- cgit v1.2.1