[PD-dev] [ pure-data-Bugs-3312794 ] pd-extended: magic glass not 64 bit clean

SourceForge.net noreply at sourceforge.net
Tue Jun 7 00:56:13 CEST 2011


Bugs item #3312794, was opened at 2011-06-07 00:56
Message generated for change (Tracker Item Submitted) made by agraef
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=3312794&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: pd-extended
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Albert Graef (agraef)
Assigned to: Hans-Christoph Steiner (eighthave)
Summary: pd-extended: magic glass not 64 bit clean

Initial Comment:
The magicGlass_new and magicGlass_setCanvas functions in g_magicglass.c both take an int parameter c which gets assigned to the x_c member of the t_magicGlass struct. However, in g_canvas.c a t_canvas* is being passed for this parameter, cast to int. This doesn't work on 64 bit systems (or if it does, you're just lucky) because an int is 32 bit and a pointer 64 bit.

Suggested fix: Make x_c a t_glist* and fix up the uses of this member in g_magicglass.c accordingly. Make the c parameter of magicGlass_new and magicGlass_setCanvas a t_glist* as well, and fix up the invocation of magicGlass_new in g_canvas.c accordingly.

I'd also suggest to move the declaration of the t_magicGlass struct into g_magicglass.h. Currently it is replicated in g_magicglass.c and g_canvas.c which is error-prone.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=3312794&group_id=55736



More information about the Pd-dev mailing list