[PD-dev] "int argc" giving weird values

Alexandre Torres Porres porres at gmail.com
Wed Mar 3 07:52:30 CET 2021


Hi, been working on a delread/write variation as posted on the pd-list with
more features, like freezing. I have a single "del~" object (named like
this for now) and I can define if it's "in" (write) or "out" (read). This
is like other pd objects like [list]. I do this so I can use pd_findbyclass so
I can pair objects by delay line name ([del~ in xxx] and [del~ out xxx]). I
read that was the way to do it in some other thread here not long ago.

Now, maybe I've seen this weird behaviour before but I can't see what's
happening. I have A_GIMME to parse arguments and when trying to print the
number of arguments (usually defined as "argc") I don't get the values I
expect, but very large and negative ones (what the hell?).

I uploaded my prototype just so you can see this and help me figure out
where the problem is =>
https://github.com/porres/pd-else/blob/master/Classes/Source/del~.c

here's the global setup function for both objects
https://github.com/porres/pd-else/blob/master/Classes/Source/del~.c#L290

here in the "del_new" function, if I query for the number of arguments, I
get the weird values already, see
https://github.com/porres/pd-else/blob/master/Classes/Source/del~.c#L266

why dear god, why? please please please, it's late and I'm losing sleep

thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20210303/8ab1848d/attachment.htm>


More information about the Pd-dev mailing list