On Tue, 12 Jul 2011, Jonathan Wilkes wrote:
Mathieu Bouchard matju@artengine.ca wrote:
EXTERN int canvas_isabstraction(t_canvas *x); declared in #include "g_canvas.h"
but it takes a t_canvas and I have a t_object.
pd_class(x)==canvas_class ? canvas_isabstraction((t_canvas *)x) : 0;
thus you check whether it makes sense to cast the pointer to t_canvas*, and if it does, you call the function, otherwise you know that it's not an abstraction.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC