[PD-dev] getting the classname symbol

Hans-Christoph Steiner hans at eds.org
Wed May 28 18:41:23 CEST 2008


Yee haw, that was the bit I needed, now I can get the classname from  
the t_object pointer with a little casting trickery:

post("[%s] just a test", class_getname(*(t_pd *)x));

.hc

On May 28, 2008, at 6:17 PM, Miller Puckette wrote:

> Hi HC,
>
> there's a public function,
>
> char *class_getname(t_class *c)
> {
>     return (c->c_name->s_name);
> }
>
> in m_class.c.
>
> cheers
> Miller
>
> On Wed, May 28, 2008 at 12:56:42PM +0200, Hans-Christoph Steiner  
> wrote:
>>
>> Does know have example code that shows how to access (t_class)-
>>> c_name->s_name?
>> (that one doesn't seem to work for me).
>>
>> I want to get the name of the class from the class itself, or I
>> suppose this would also be possible using t_object.
>>
>> .hc
>>
>> --------------------------------------------------------------------- 
>> ---
>> ----
>>
>> "[W]e have invented the technology to eliminate scarcity, but we are
>> deliberately throwing it away to benefit those who profit from
>> scarcity."        -John Gilmore
>>
>>
>>
>> _______________________________________________
>> PD-dev mailing list
>> PD-dev at iem.at
>> http://lists.puredata.info/listinfo/pd-dev



------------------------------------------------------------------------ 
----

                   ¡El pueblo unido jamás será vencido!






More information about the Pd-dev mailing list