[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Liberty-eiffel] How return a string to the C side
From: |
Germán Arias |
Subject: |
Re: [Liberty-eiffel] How return a string to the C side |
Date: |
Thu, 17 Nov 2016 00:17:10 -0600 |
OK, I solved the problem. The string contains three integers. So,
instead return a string with the integers I use an IUP function to join
those integer in one integer, and then I return this new integer. At C
side, I use other IUP function the get the three integers (from the
returned integer) and make a char* string with these values. Then I can
return this array of chars.
Regards
Germán
El mié, 16-11-2016 a las 01:14 -0600, Germán Arias escribió:
> Hi,
>
> Most of the callbacks in eiffel-iup returns integers. But there is
> one
> callback that returns a char*. So I'm using a string and I try return
> this with my_string.to_external, but I get something like this:
>
> warning: cast to pointer from integer of different size [-Wint-to
> -pointer-cast]
>
> Is harmful this? How can eliminate this warning? Or maybe there is a
> better way to return a string. This is not a single char, is in fact
> a
> string. I don't have to much experience with C.
>
> Thanks
> Germán
>
>