fixes and docs in %rename

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8160 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-01 11:01:12 +00:00
commit dfd35441ec
7 changed files with 586 additions and 319 deletions

View file

@ -1,18 +1,18 @@
%module rename_camel
%define CamelCase "%(command:sed -e 's/\([a-z]\)/\U\\1/' -e 's/\(_\)\([a-z]\)/\U\\2/g' <<< %s)s" %enddef
%define SedCmd "%(command:sed -e 's/\([a-z]\)/\U\\1/' -e 's/\(_\)\([a-z]\)/\U\\2/g' <<<)s" %enddef
%rename(CamelCase1) camel_case_1;
%rename(SedCmd) camel_case_2;
%rename("%(ctitle)s") camel_case_3;
%rename("CamelCase1") camel_case_1;
%rename("_%s") camel_case_2;
%rename("%(mangle)s") camel_case_3;
%rename("%(title)s") camel_case_4;
%rename(CamelCase) camel_case;
%rename(CamelCase) also_works_here;
%rename("%(title)s",match$parentNode$type="enum HelloEnum") "";
%rename("%(ctitle)s",match$parentNode$type="enum ChaoEnum") "";
%rename("%(title)s",match="enumitem") "*";
#define awk_cmd "%(command:awk '/^i/{print toupper($1)}' <<<)s"
%rename(awk_cmd) "";
%inline
{
@ -24,8 +24,15 @@
int also_works_here(int);
enum HelloEnum {
hi, hello
hello, hi_there
};
enum ChaoEnum {
bye, see_you
};
int import(int);
int foo(int);
}