[PD-dev] changes in atom_getsymbol between pd 0.40-3 and 0.42.4?

martin.peach at sympatico.ca martin.peach at sympatico.ca
Thu Feb 18 20:49:39 CET 2010


That's because atom_getint() wants a pointer to an atom, not the atom itself.
Try:

intValue = atom_getint(((gphoto_gimme_struct *)threadArgs)->argv+1);

or:

intValue = atom_getint(&((gphoto_gimme_struct *)threadArgs)->argv[1]);

Martin

ben wrote:
> Yes after copying.
>
> gcc does not like either, both result in:
>
> error: incompatible type for argument 1 of 'atom_getint'
>
> This is the old way:
>
> intValue = atom_getint( ((gphoto_gimme_struct *)threadArgs)->argv+1 );
> post("in: config value: %d", intValue);
>
> and I tried both these:
>
> intValue = atom_getint( *(((gphoto_gimme_struct *)threadArgs)->argv+1) );
>
> intValue = atom_getint( ((gphoto_gimme_struct *)threadArgs)->argv[1] );
>
> Same thing happens when I try to access the second argument from the
> wrapper function, from the threadargs struct.
>
> .b.
>
>
>
> martin.peach at sympatico.ca wrote:
>> ben wrote:
>>
>>> ...
>>> So that worked for getting the proper value, but the method I was using
>>> to get the second argument (argv+1) no longer works. Presumably because
>>> the "next" location is no longer the same.
>>> ...
>>
>> Do you mean after you copied the data? Did you try either
>>
>> threadargs->argv[1]
>>
>> or
>>
>> *(threadargs->argv+1)
>>
>> ? They should both give the value of the second argument.
>>
>>
>>
>> Martin
>>
>>
>>
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
 		 	   		  



More information about the Pd-dev mailing list