[PD-dev] Using & operator on t_symbol?

B. Bogart ben at ekran.org
Thu Mar 26 17:20:25 CET 2009


Thanks Johannes,

I don't believe this function changes the value. It is the norm in the
gphoto functions to accept a pointer as an argument for some reason.

That being said, its not working the way I imagine, so something strange
could be happening in the gphoto function.

So I've taken your advice.

Things are now working on that front, having to typecast the strcpy from
s_name seemed a bit weird:

strcpy(charkey,(char *)textValue->s_name);

without the cast the value never gets set.

Say Johannes, had a chance to consider my thread on pthreads?

Thanks,
B.



> never ever change the value of a symbol. they are constants.
> you will get crashes and everything.
> 
> if you have a function that wants to change strings, you have to use
> stings and not symbols. (convert a symbol to a char[]; modify it; call
> gensym() on the new string)
> 
> fgamdsr
> IOhannes






More information about the Pd-dev mailing list