[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Liberty-eiffel] Question about plugins
From: |
Germán Arias |
Subject: |
Re: [Liberty-eiffel] Question about plugins |
Date: |
Fri, 18 Dec 2015 12:27:43 -0600 |
Thanks. Now I have a problem with a c function of the form:
cFucntion(arg1, arg2, arg3, ...., argN, NULL)
The problem is the NULL at the end. How add this? I'm using a
NATIVE_ARRAY for the arguments, but seems that this class don't add the
NULL at the end when use feature .to_external. Any advice?
Thanks
Germán
El jue, 17-12-2015 a las 18:30 +0100, Cyril ADRIAN escribió:
> Hi Germán,
>
>
> It is indeed the recommended way.
>
>
> Note: avoid modifying the char array because it is the raw STRING
> storage. The object would be inconsistent.
>
>
>
> Cheers,
>
>
> Cyril
>
>
>
> 2015-12-17 8:04 GMT+01:00 Germán Arias <address@hidden>:
> Hi all,
>
> I need call a c function with char arguments. So I need
> convert STRING
> object into chars. To do this I'm using two features, like
> these:
>
> feature {}
> message (title: STRING; text: STRING)
> do
> int_message (title.to_external, text.to_external)
> end
>
> int_message (title: POINTER; text: POINTER)
> external "plug_in"
> alias "{
> location: "."
> module_name: "my_plugin"
> feature_name: "c_function"
> }"
> end
> end
>
> My question is: Is this the appropriate way? Or there is a
> more
> easy/recommended way?
>
> Thanks
> Germán
>
>
>
>
>
>
> --
> Cyril ADRIAN
>