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.
>
>
>
> [email protected] 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
> [email protected]
> http://lists.puredata.info/listinfo/pd-dev
                                          
_______________________________________________
Pd-dev mailing list
[email protected]
http://lists.puredata.info/listinfo/pd-dev

Reply via email to