allow to predefine %begin_block,%end_block
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8260 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
45246b601a
commit
44ce7e339c
1 changed files with 6 additions and 2 deletions
|
|
@ -89,8 +89,12 @@
|
|||
|
||||
#define %arg(Arg...) Arg
|
||||
#define %str(Arg) `Arg`
|
||||
#define %begin_block do {
|
||||
#define %end_block } while(0)
|
||||
#ifndef %begin_block
|
||||
# define %begin_block do {
|
||||
#endif
|
||||
#ifndef %end_block
|
||||
# define %end_block } while(0)
|
||||
#endif
|
||||
#define %block(Block...) %begin_block Block; %end_block
|
||||
|
||||
/* define a new macro */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue