workaround for Perl5 on OSX including math.h somewhere
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10352 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5d8d045c1f
commit
ec4491556f
1 changed files with 3 additions and 3 deletions
|
|
@ -50,7 +50,7 @@ extern double (Shape::*perimetervar)(void);
|
|||
%}
|
||||
|
||||
%{
|
||||
# define M_PI 3.14159265358979323846
|
||||
# define SWIG_M_PI 3.14159265358979323846
|
||||
|
||||
/* Move the shape to a new location */
|
||||
void Shape::move(double dx, double dy) {
|
||||
|
|
@ -61,11 +61,11 @@ void Shape::move(double dx, double dy) {
|
|||
int Shape::nshapes = 0;
|
||||
|
||||
double Circle::area(void) {
|
||||
return M_PI*radius*radius;
|
||||
return SWIG_M_PI*radius*radius;
|
||||
}
|
||||
|
||||
double Circle::perimeter(void) {
|
||||
return 2*M_PI*radius;
|
||||
return 2*SWIG_M_PI*radius;
|
||||
}
|
||||
|
||||
double Square::area(void) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue