On Tue, 12 Jul 2011, Jonathan Wilkes wrote:
Mathieu Bouchard <[email protected]> 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
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list