[PD] #N struct

Jonathan Wilkes jancsika at yahoo.com
Sat Aug 16 06:21:50 CEST 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20140815/6ed56d00/attachment.html>


More information about the Pd-list mailing list