cosmetics
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8407 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
03aa663f5a
commit
02faa27d3f
1 changed files with 21 additions and 19 deletions
|
|
@ -167,10 +167,11 @@
|
||||||
|
|
||||||
int move(int direction)
|
int move(int direction)
|
||||||
|
|
||||||
In this case, you might want to restrict the direction argument to one of the supplied
|
In this case, you might want to restrict the direction argument to
|
||||||
constant names. To do this, you could write some typemap code by hand. Alternatively,
|
one of the supplied constant names. To do this, you could write some
|
||||||
you can use the %aggregate_check macro defined here to create a simple check function
|
typemap code by hand. Alternatively, you can use the
|
||||||
for you. Here is an example:
|
%aggregate_check macro defined here to create a simple check
|
||||||
|
function for you. Here is an example:
|
||||||
|
|
||||||
%aggregate_check(int, check_direction, UP, DOWN, LEFT, RIGHT);
|
%aggregate_check(int, check_direction, UP, DOWN, LEFT, RIGHT);
|
||||||
|
|
||||||
|
|
@ -186,6 +187,7 @@
|
||||||
require:
|
require:
|
||||||
check_direction(x);
|
check_direction(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
%define %aggregate_check(TYPE, NAME, FIRST, ...)
|
%define %aggregate_check(TYPE, NAME, FIRST, ...)
|
||||||
|
|
@ -238,7 +240,7 @@ static int NAME(TYPE x) {
|
||||||
%define %isdestructor match="destructor" %enddef
|
%define %isdestructor match="destructor" %enddef
|
||||||
%define %isnamespace match="namespace" %enddef
|
%define %isnamespace match="namespace" %enddef
|
||||||
%define %istemplate match="template" %enddef
|
%define %istemplate match="template" %enddef
|
||||||
%define %isconstant match="constant" %enddef
|
%define %isconstant match="constant" %enddef /* %constant definition */
|
||||||
|
|
||||||
%define %isunion match$kind="union" %enddef
|
%define %isunion match$kind="union" %enddef
|
||||||
%define %isfunction match$kind="function" %enddef
|
%define %isfunction match$kind="function" %enddef
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue