Hi Miller,I'm experimenting with a gpointer revision by changing the "struct 
_scalar *gp_scalar" to "struct _gobj *gp_gobj".  This allows me to use 
gpointers in my introspection classes to refer to any Pd object that has a gobj 
header.  The benefits are that it's a single atom as opposed to a canvas 
name/level + index number, and it's noticeably faster when the user is querying 
lots and lots of objects.
Because gpointer_check code is already used in all the objects in 
g_traversal.c, it's easy to just add a check to make sure the pointer points to 
a t_scalar class.  That way all the current classes dealing with pointers work 
exactly as they do currently.  (Other than [pointer] which needs to accept 
non-scalar pointers, too.)

It works fine so far, but do you see any "gotchas" with this approach?
-Jonathan
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to