<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div style="" class=""><span style="" class="">Now I'm even more confused.  In the past you had written this to a query of mine:</span></div><pre style="" class="">>On 01/12/2013 12:04 AM, Jonathan Wilkes wrote:
>>>>> In C would I just make a struct with fields of t_symbol,
>>>>>
>>>>> t_class, and a pointer to link to the next one?
>>>>
>>>>
>>>> Yeah, a linked list would work fine, probably not as efficient as >the c++ hash structure (but lots easier
>to maintain).  One nit-to-pick:  Use a t_class pointer, which is a >t_pd.
>>
>>
>> Hm... since the code to add new classes to the list will probably
>> end up looking exactly like the code to add symbols to the
>> symbol table, what if I just bloat the _symbol struct by adding
>> a t_class *s_class?  Would that affect performance?

>it would break binary compatibility.<br><br>But now you say the opposite in response to DesireData's _symbol struct which adds a refcount and a symbol size member "n".<br><br>How does the one break binary compatibility but the other does not?<br><br>-Jonathan<br></pre> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="" class="" dir="ltr"> <font style="" class="" face="Arial" size="2"> On Friday, September 26, 2014 1:48 AM, IOhannes m zmölnig <zmoelnig@iem.at> wrote:<br style="" class=""> </font> </div>  <br style="" class=""><br style="" class=""> <div style="" class="">On 09/26/2014 04:22 AM, Jonathan Wilkes via Pd-list wrote:<br
 style="" class="">> On 09/25/2014 12:54 PM, Jonathan Wilkes via Pd-list wrote:<br style="" class="">>> Um... have you actually read the source for DesireData?<br style="" class="">> <br style="" class="">> Just to clarify this-- from m_pd.h desiredata 2010.01.05:<br style="" class="">> <br style="" class="">> struct _symbol {<br style="" class="">>     char *name;           /* the const string that represents this<br style="" class="">> symbol */<br style="" class="">>     t_pd *thing;          /* pointer to the target of a receive-symbol<br style="" class="">> or to the bindlist of several targets */<br style="" class="">>     struct _symbol *next; /* brochette of all symbols (only for<br style="" class="">> permanent symbols) */<br style="" class="">>     size_t refcount;      /* refcount<0 means that
 the symbol is<br style="" class="">> permanent */<br style="" class="">>     size_t n;             /* size of name (support for NUL characters) */<br style="" class="">> #ifdef PD_PLUSPLUS_FACE<br style="" class="">>     bool operator == (const char *s) const {return<br style="" class="">> strcmp(this->name,s)==0;}<br style="" class="">>     bool operator != (const char *s) const {return strcmp(this->name,s);}<br style="" class="">> #endif<br style="" class="">> };<br style="" class="">> <br style="" class="">> Desiredata's t_symbol has extra members that aren't in Pd Vanilla's<br style="" class="">> t_symbol struct.  If there is any external out there that uses an array<br style="" class="">> of symbols, then there will be problems due to this binary compatibility.<br style="" class="">> <br style="" class=""><br style="" class="">actually, i
 have yet to come across a *single* external that uses<br style="" class="">(t_symbol) rather than (t_symbol*) - or, if you insist on arrays<br style="" class="">(t_symbol[]) rather than (t_symbol*[]).<br style="" class=""><br style="" class="">i don't see how this breaks binary compatibility - unless of course you<br style="" class="">*use* these members¹...<br style="" class=""><br style="" class="">fmgdsr<br style="" class="">IOhannes<br style="" class=""><br style="" class=""><br style="" class="">¹ that is, pass them around, in a "dosomething(s->foo)" sort of way (and<br style="" class="">i don't know how to do this with an overloaded operator).<br style="" class="">since the additional members are actually methods with an implementation<br style="" class="">in the header file, i guess that any compiler would just inline them<br style="" class="">when it comes to using them (in an "s->foo(z)" sort of way), rather than<br style=""
 class="">forcing a resolving via dynamic lookup.<br style="" class=""><br style="" class=""><br style="" class=""><br style="" class="">_______________________________________________<br style="" class=""><a href="" style="" class="" ymailto="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br style="" class="">UNSUBSCRIBE and account-management -> <a href="" style="" class="" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br style="" class=""><br style="" class=""><br style="" class=""></div>  </div> </div>  </div> </div></body></html>