liberty-eiffel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Liberty-eiffel] Question about plugins


From: Cyril ADRIAN
Subject: Re: [Liberty-eiffel] Question about plugins
Date: Thu, 17 Dec 2015 18:30:32 +0100

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]