Difference between revisions of "Inlining"

From Liberty Eiffel Wiki
Jump to navigation Jump to search
m (10 revisions: initial import from SamrtEiffel Wiki - The Grand SmartEiffel Book)
(No difference)

Revision as of 22:04, 3 March 2013


There exists a capability unique to SmartEiffel of putting C code in line. Of course, this method is only usable with compile_to_c.

Two methods c_inline_c and c_inline_h are defined in ANY. These two methods take a single parameter, a manifest character string.

  • c_inline_c inserts in line, at the appropriate spot in the generated feature, the C code of the character string;
  • c_inline_h inserts the C code of the character string in the Smarteiffel-generated header file (.h).

Use of these functions implies a precise knowledge of the SmartEiffel C code (and doesn't favour portability). We don't guarantee backwards compatibility with code using these two methods.

If, despite all these warnings, you want to know more, read this page.