more uniform treatment of extern C. This also fix the defarg mechanism when declaring C functions inside C++.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6621 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-11-02 19:03:01 +00:00
commit ec2d6ba128
2 changed files with 50 additions and 9 deletions

View file

@ -180,3 +180,19 @@ Klass constructorcall(const Klass& k = Klass()) { return k; }
}
%}
%inline
%{
extern "C" double cfunc1(double x,double p = 1) {
return(x+p);
}
extern "C" {
double cfunc2(double x,double p = 2) {
return(x+p);
}
double cfunc3(double x,double p = 3) {
return(x+p);
}
}
%}