[PD] pd on Ubuntu 64bit?

Claude Heiland-Allen claudiusmaximus at goto10.org
Fri Feb 27 14:15:32 CET 2009


IOhannes m zmoelnig wrote:
> Hans-Christoph Steiner wrote:
>> I just ran a check of the code in SVN, turns out there are many using
>> garray_getfloatarray().  What's the conversion path for that?  That
>> would be good to fix, so we can have fully working 64-bit builds of all
>> this:
> 
> 
> the conversion path is to make your hands dirty.
> in zexy (and then: iemlibs) i tried to do a generic approach using some
> prepocessor magic ;but it doesn't keep you from changing every line of
> code accessing a table.

In pdlua I used some preprocessor magic similar to this, not sure how it 
compares to the zexy/iemlibs magic but I guess it's roughly the same:

#if PD_MAJOR_VERSION == 0
# if PD_MINOR_VERSION >= 41
/* use new garray support that is 64-bit safe */
#  define PDLUA_ARRAYGRAB garray_getfloatwords
#  define PDLUA_ARRAYTYPE t_word
#  define PDLUA_ARRAYELEM(arr,idx) ((arr)[(idx)].w_float)
# else
/* use old garray support, not 64-bit safe */
#  define PDLUA_ARRAYGRAB garray_getfloatarray
#  define PDLUA_ARRAYTYPE t_float
#  define PDLUA_ARRAYELEM(arr,idx) ((arr)[(idx)])
# endif
#endif

then use the macros instead of direct array access, still needs some 
work to change all array-related lines as IOhannes says...

I'm not even sure this is correct, works for me on my 32bit system.


Claude
-- 
http://claudiusmaximus.goto10.org




More information about the Pd-list mailing list