On Fri, Oct 31, 2014 at 6:51 AM, Tudor Girba <tu...@tudorgirba.com> wrote:

> That is cool.
>

As long as we keep what is working, ahem, working. I now depend on quite a
couple of FFI related libs.

What I need is an easy FFI wrapping tool, like
https://github.com/ronsaldo/swig. Is UFFI going that way?

Phil

>
> Doru
>
> On Thu, Oct 30, 2014 at 11:37 PM, stepharo <steph...@free.fr> wrote:
>
>>  Ronie is working on unifying all the api and proposing one syntax
>> mechanism for
>>     - nativeBoost back-end
>>     - FFI
>>     and may be Alien
>>
>> The FFI situation is not good and we know we should improve it.
>>
>>
>> On 29/10/14 20:18, Thomas Bany wrote:
>>
>>  Oops, sorry, I was misslead by Steph reply.
>>
>>  Some of the comments might still hold. For the *time: ’05:45’* code to
>> work, you would need FFI to handle all the hassle of memory management and
>> actually allocate the memory for 5 characters and copying it. I never used
>> FFI but I doubt it does this.
>>
>>  Looking at FFI library, you both have ExternalAddress (for the struct
>> with char*) and ExternalType (for the struct with char[5]) that you can
>> use. For the later solution, it still looks like you should define a
>> specific 5 bytes ArrayOf5Char type.
>>
>> 2014-10-29 18:34 GMT+01:00 Annick Fron <l...@afceurope.com>:
>>
>>> I can’t use NativeBoost on the Raspberry, I would be glad if I could !!!
>>>
>>>
>>> Le 29 oct. 2014 à 12:18, stepharo <steph...@free.fr> a écrit :
>>>
>>> > did you read the NativeBoost tutorial on the PharoForTheEntreprise
>>> book?
>>> > If you do please report potential mistakes so that we can improve.
>>> >
>>> >
>>> > On 29/10/14 05:59, Annick Fron wrote:
>>> >> I I have a C struct with a char*
>>> >>
>>> >> struct result {
>>> >>      char* time }
>>> >>
>>> >> I define an ExternalStructure in FFI , with one field of type char*
>>> (note that the syntax char [5] is not accepted ! ).
>>> >>
>>> >> defineFields generates the accessors time and time:
>>> >>
>>> >> If I use
>>> >> time: ’05:45’
>>> >>
>>> >> I get an error.
>>> >> How do I set a string value in an ExternalStructure ?
>>> >>
>>> >> Annick
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>>
>>
>>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>

Reply via email to