Call a foreign-language function: Difference between revisions

Content added Content deleted
(Add Ecstasy explanation)
Line 679: Line 679:


Afterwards usage of the function is just as with any other function.
Afterwards usage of the function is just as with any other function.

=={{header|Ecstasy}}==
Ecstasy was designed around software containers and a strong security model. As such, Ecstasy does not have a FFI, and Ecstasy code cannot direcly access operating system or other foreign functions. More specifically, code running within an Ecstasy container cannot call foreign functions; any such required capabilities must be implemented outside of Ecstasy and then <i>injected</i> into an Ecstasy container.

=={{header|Factor}}==
=={{header|Factor}}==
If you declare a parameter as <code>c-string</code>, Factor automatically converts NULL-terminated C strings to Factor strings and back. In this case we additionally have to free the returned string, so we have to do the conversion explicitly; else the reference to the pointer would be dropped behind the scenes.
If you declare a parameter as <code>c-string</code>, Factor automatically converts NULL-terminated C strings to Factor strings and back. In this case we additionally have to free the returned string, so we have to do the conversion explicitly; else the reference to the pointer would be dropped behind the scenes.