[PD] #N struct
Miller Puckette
msp at ucsd.edu
Sun Aug 17 20:57:51 CEST 2014
Hi Jonathan -
As far as I know there's no reason not to write out whatever headers you
like as long as they don't conflict with "structs" in the patch.
cheers
M
On Fri, Aug 15, 2014 at 09:21:50PM -0700, Jonathan Wilkes via Pd-list wrote:
> Miller,
> Is it ok to add (potentially) more "#N struct etc." headers to patch files, specifically for templates that are defined in that patch?
>
> It looks like that header is currently written for orphan scalars, or for scalars whose template might be defined elsewhere (like in a patch or abstraction which hasn't loaded yet). But I've added some checks in gtemplate_new to prevent [struct] objects from creating when there are circular dependencies and/or undefined array element templates. In those case, having the "#N struct" headers will ensure that the structs will be able to create when the patch is reloaded.
>
> This should prevent the user from crashing Pd when manually creating [struct] objects, while the "#N struct" stuff will let Pd create all the templates it needs for the patch to load correctly. (Of course someone could still edit a patch file by hand and cause a circular dependency crash or something, but I'm not sure how to prevent that.)
>
> That would leave a single reallocation crasher somewhere in template_conformglist. It happens when you have scalar with array elements in it, and you start mucking around with the [struct] args of either the container or the array element template. (I can't reproduce it reliably yet.)
>
> -Jonathan
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list
mailing list