From ea2e615cec87a469850605c6eda4f966ec1450da Mon Sep 17 00:00:00 2001
From: William S Fulton
Variable length argument lists are not supported, by default. If
such a function is encountered, a warning will generated to
- stderr. Varargs are supported via the SWIG %vararg
+ stderr. Varargs are supported via the SWIG %varargs
directive. This directive allows you to specify a (finite)
argument list which will be inserted into the wrapper in place
of the variable length argument indicator. As an example,
@@ -1624,7 +1624,7 @@ opoverload>
See the following section
on Variable Length arguments
- provides examples on how %vararg can be used, along
+ provides examples on how %varargs can be used, along
with other ways such functions can be wrapped.
The second and more intuitive way, would be to pass a Lua table directly into the function, and have SWIG automatically convert between Lua-table and C-array. Within the <typemaps.i> file there are typemaps ready written to perform this task. To use them is again a matter of using %appy in the correct manner.
+The second and more intuitive way, would be to pass a Lua table directly into the function, and have SWIG automatically convert between Lua-table and C-array. Within the <typemaps.i> file there are typemaps ready written to perform this task. To use them is again a matter of using %apply in the correct manner.
The wrapper file below, shows both the use of carrays as well as the use of the typemap to wrap arrays.
diff --git a/Doc/Manual/Varargs.html b/Doc/Manual/Varargs.html index 13abc8cee..a580c83bd 100644 --- a/Doc/Manual/Varargs.html +++ b/Doc/Manual/Varargs.html @@ -398,7 +398,7 @@ int execlp(const char *path, const char *arg, ...);-Note that str3 is the name of the last argument, as we have used %vargars with 3. +Note that str3 is the name of the last argument, as we have used %varargs with 3. Now execlp("a", "b", "c", "d", "e") will result in an error as one too many arguments has been passed, as now only 2 additional 'str' arguments can be passed with the 3rd one always using the specified default NULL.
diff --git a/Lib/typemaps/implicit.swg b/Lib/typemaps/implicit.swg index 24bb3dcce..702fb52b8 100644 --- a/Lib/typemaps/implicit.swg +++ b/Lib/typemaps/implicit.swg @@ -1,5 +1,5 @@ /* - The %implict macro allows a SwigType (Class) to be accepted + The %implicit macro allows a SwigType (Class) to be accepted as an input parameter and use its implicit constructors when needed. For example: