[PD] Dynamic patching with audio - review
Mathieu Bouchard
matju at artengine.ca
Tue Mar 22 14:56:28 CET 2011
On Tue, 22 Mar 2011, Rich E wrote:
> Thanks for the insight into more pd internals, although I think I prefer
> an approach that does not heavily rely on public pointers floating
> around, like pd_newest
pd_newest is a function returning a pointer, not a pointer itself. that's
an easy mistake to do, especially as the return value of it gets almost
always cast to a more specific type such as :
t_my_something_tilde *stuff = (t_my_something_tilde *)pd_newest();
> (it is funny that it is declared in m_pd.h, but then there is a comment
> above its implementation that it is a hack, maybe be removed or
> redesigned).
No, it's not funny. Miller will call "hacks" things that are quite normal
to be doing, and then forget about them entirely, and 15 years later,
people like you still assume that the comments mean something, even though
in the meantime 13 or 42 developers had to call pd_newest() somewhere
because it's the only way to do a rather basic thing.
> By the way, if I call pd_newest after glob_evalfile(), will it give me
> a reference to the patch?
More information about the Pd-list
mailing list