diff --git a/Doc/Manual/Contents.html b/Doc/Manual/Contents.html index 97db5f11c..f3beb2298 100644 --- a/Doc/Manual/Contents.html +++ b/Doc/Manual/Contents.html @@ -358,26 +358,32 @@

-The %inline directive inserts all of the code that follows +This is the same as writing: +

+ +
+%{
+/* Create a new vector */
+Vector *new_Vector() {
+  return (Vector *) malloc(sizeof(Vector));
+}
+%}
+
+/* Create a new vector */
+Vector *new_Vector() {
+  return (Vector *) malloc(sizeof(Vector));
+}
+
+

+In other words, the %inline directive inserts all of the code that follows verbatim into the header portion of an interface file. The code is then parsed by both the SWIG preprocessor and parser. Thus, the above example creates a new command new_Vector using only one @@ -3315,6 +3331,11 @@ declaration. Since the code inside an %inline %{ ... %} block is given to both the C compiler and SWIG, it is illegal to include any SWIG directives inside a %{ ... %} block.

+ +

+Note: The usual SWIG C preprocessor rules apply to code in %apply blocks when SWIG parses this code. For example, as mentioned earlier, SWIG's C Preprocessor does not follow #include directives by default. +

+

5.6.4 Initialization blocks