summaryrefslogtreecommitdiff
path: root/Examples/php
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/php')
-rw-r--r--Examples/php/callback/Makefile8
-rw-r--r--Examples/php/class/Makefile8
-rw-r--r--Examples/php/constants/Makefile8
-rw-r--r--Examples/php/cpointer/Makefile8
-rw-r--r--Examples/php/disown/Makefile8
-rw-r--r--Examples/php/disown/example.h10
-rw-r--r--Examples/php/enum/Makefile8
-rw-r--r--Examples/php/extend/Makefile8
-rw-r--r--Examples/php/extend/example.h2
-rw-r--r--Examples/php/funcptr/Makefile8
-rw-r--r--Examples/php/overloading/Makefile8
-rw-r--r--Examples/php/pointer/Makefile8
-rw-r--r--Examples/php/pragmas/Makefile8
-rw-r--r--Examples/php/proxy/Makefile8
-rw-r--r--Examples/php/proxy/example.h8
-rw-r--r--Examples/php/reference/Makefile8
-rw-r--r--Examples/php/reference/example.cxx10
-rw-r--r--Examples/php/reference/example.h8
-rw-r--r--Examples/php/reference/example.i12
-rw-r--r--Examples/php/simple/Makefile8
-rw-r--r--Examples/php/sync/Makefile8
-rw-r--r--Examples/php/sync/example.cxx2
-rw-r--r--Examples/php/value/Makefile8
-rw-r--r--Examples/php/value/example.i2
-rw-r--r--Examples/php/variables/Makefile8
-rw-r--r--Examples/php/variables/example.c4
26 files changed, 93 insertions, 101 deletions
diff --git a/Examples/php/callback/Makefile b/Examples/php/callback/Makefile
index 6f7e4ad27..3ad3999a5 100644
--- a/Examples/php/callback/Makefile
+++ b/Examples/php/callback/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/class/Makefile b/Examples/php/class/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/class/Makefile
+++ b/Examples/php/class/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/constants/Makefile b/Examples/php/constants/Makefile
index 3f24a3921..e5b49571e 100644
--- a/Examples/php/constants/Makefile
+++ b/Examples/php/constants/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/cpointer/Makefile b/Examples/php/cpointer/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/cpointer/Makefile
+++ b/Examples/php/cpointer/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/disown/Makefile b/Examples/php/disown/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/disown/Makefile
+++ b/Examples/php/disown/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/disown/example.h b/Examples/php/disown/example.h
index 985bc333d..e9f96743f 100644
--- a/Examples/php/disown/example.h
+++ b/Examples/php/disown/example.h
@@ -9,7 +9,7 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
+ }
double x, y;
void move(double dx, double dy);
virtual double area(void) = 0;
@@ -22,8 +22,8 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- ~Circle() { };
+ Circle(double r) : radius(r) { }
+ ~Circle() { }
void set_radius( double r );
virtual double area(void);
virtual double perimeter(void);
@@ -33,7 +33,7 @@ class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
+ Square(double w) : width(w) { }
~Square() { }
virtual double area(void);
virtual double perimeter(void);
@@ -44,7 +44,7 @@ private:
typedef std::vector<Shape*>::iterator iterator;
std::vector<Shape*> shapes;
public:
- ShapeContainer() : shapes() {};
+ ShapeContainer() : shapes() {}
~ShapeContainer();
void addShape( Shape *s );
};
diff --git a/Examples/php/enum/Makefile b/Examples/php/enum/Makefile
index 22f979d2f..2028d03c7 100644
--- a/Examples/php/enum/Makefile
+++ b/Examples/php/enum/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT = -noproxy
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/extend/Makefile b/Examples/php/extend/Makefile
index 6f7e4ad27..3ad3999a5 100644
--- a/Examples/php/extend/Makefile
+++ b/Examples/php/extend/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/extend/example.h b/Examples/php/extend/example.h
index b27ab9711..ca1aed28f 100644
--- a/Examples/php/extend/example.h
+++ b/Examples/php/extend/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/php/funcptr/Makefile b/Examples/php/funcptr/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/funcptr/Makefile
+++ b/Examples/php/funcptr/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/overloading/Makefile b/Examples/php/overloading/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/overloading/Makefile
+++ b/Examples/php/overloading/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/pointer/Makefile b/Examples/php/pointer/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/pointer/Makefile
+++ b/Examples/php/pointer/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/pragmas/Makefile b/Examples/php/pragmas/Makefile
index 3f24a3921..e5b49571e 100644
--- a/Examples/php/pragmas/Makefile
+++ b/Examples/php/pragmas/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/proxy/Makefile b/Examples/php/proxy/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/proxy/Makefile
+++ b/Examples/php/proxy/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/proxy/example.h b/Examples/php/proxy/example.h
index 361dff898..0683f07f3 100644
--- a/Examples/php/proxy/example.h
+++ b/Examples/php/proxy/example.h
@@ -9,7 +9,7 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
+ }
double x, y;
void move(double dx, double dy);
virtual double area(void) = 0;
@@ -22,8 +22,8 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- ~Circle() { };
+ Circle(double r) : radius(r) { }
+ ~Circle() { }
void set_radius( double r );
virtual double area(void);
virtual double perimeter(void);
@@ -33,7 +33,7 @@ class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
+ Square(double w) : width(w) { }
~Square() { }
virtual double area(void);
virtual double perimeter(void);
diff --git a/Examples/php/reference/Makefile b/Examples/php/reference/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/reference/Makefile
+++ b/Examples/php/reference/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/reference/example.cxx b/Examples/php/reference/example.cxx
index 13e47eade..7ead7fbf6 100644
--- a/Examples/php/reference/example.cxx
+++ b/Examples/php/reference/example.cxx
@@ -19,23 +19,23 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::as_string() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
VectorArray::VectorArray(int size) {
items = new Vector[size];
maxsize = size;
- printf("VectorArray new: self=%p\n",this);
+ printf("VectorArray new: self=%p\n", (void *)this);
}
VectorArray::~VectorArray() {
- printf("VectorArray delete: self=%p\n",this);
+ printf("VectorArray delete: self=%p\n", (void *)this);
delete [] items;
}
Vector &VectorArray::operator[](int index) {
- printf("VectorArray: read[%d] self=%p\n",index,this);
+ printf("VectorArray: read[%d] self=%p\n", index, (void *)this);
if ((index < 0) || (index >= maxsize)) {
printf("Panic! Array index out of bounds.\n");
exit(1);
@@ -44,6 +44,6 @@ Vector &VectorArray::operator[](int index) {
}
int VectorArray::size() {
- printf("VectorArray: size %d self=%p\n",maxsize,this);
+ printf("VectorArray: size %d self=%p\n", maxsize, (void *)this);
return maxsize;
}
diff --git a/Examples/php/reference/example.h b/Examples/php/reference/example.h
index 1b88cbf5c..353b88835 100644
--- a/Examples/php/reference/example.h
+++ b/Examples/php/reference/example.h
@@ -4,8 +4,8 @@ class Vector {
private:
double x,y,z;
public:
- Vector() : x(0), y(0), z(0) { };
- Vector(double x, double y, double z) : x(x), y(y), z(z) { };
+ Vector() : x(0), y(0), z(0) { }
+ Vector(double x, double y, double z) : x(x), y(y), z(z) { }
friend Vector operator+(const Vector &a, const Vector &b);
char *as_string();
};
@@ -20,7 +20,3 @@ public:
Vector &operator[](int);
int size();
};
-
-
-
-
diff --git a/Examples/php/reference/example.i b/Examples/php/reference/example.i
index d6122866b..df1459921 100644
--- a/Examples/php/reference/example.i
+++ b/Examples/php/reference/example.i
@@ -1,10 +1,6 @@
/* File : example.i */
-/* This example has nothing to do with references but the name is used by all
- * the other languages so it's hard to rename to something more meaningful.
- *
- * Mostly it shows how to use %extend.
- */
+/* This file has a few "typical" uses of C++ references. */
%module example
@@ -33,11 +29,11 @@ public:
VectorArray(int maxsize);
~VectorArray();
int size();
-
- /* This wrapper provides an alternative to the [] operator */
+
+ /* This wrapper provides an alternative to the [] operator */
%extend {
Vector &get(int index) {
- printf("VectorArray extended get: %p %d\n",$self,index);
+ printf("VectorArray extended get: %p %d\n", (void *)$self, index);
return (*$self)[index];
}
void set(int index, Vector &a) {
diff --git a/Examples/php/simple/Makefile b/Examples/php/simple/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/simple/Makefile
+++ b/Examples/php/simple/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/sync/Makefile b/Examples/php/sync/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/sync/Makefile
+++ b/Examples/php/sync/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/sync/example.cxx b/Examples/php/sync/example.cxx
index 31ed2021b..0942279b2 100644
--- a/Examples/php/sync/example.cxx
+++ b/Examples/php/sync/example.cxx
@@ -10,4 +10,4 @@ void Sync::printer(void) {
printf("The value of global x is %d\n", x);
printf("The value of class s is %s\n", s);
printf("The value of class x is %d\n", x);
-};
+}
diff --git a/Examples/php/value/Makefile b/Examples/php/value/Makefile
index 449686784..3db7afec5 100644
--- a/Examples/php/value/Makefile
+++ b/Examples/php/value/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT = -noproxy
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/value/example.i b/Examples/php/value/example.i
index 386fa3b84..20a453468 100644
--- a/Examples/php/value/example.i
+++ b/Examples/php/value/example.i
@@ -11,7 +11,7 @@
%inline %{
void vector_print(Vector *v) {
- printf("Vector %p = (%g, %g, %g)\n", v, v->x, v->y, v->z);
+ printf("Vector %p = (%g, %g, %g)\n", (void *)v, v->x, v->y, v->z);
}
%}
diff --git a/Examples/php/variables/Makefile b/Examples/php/variables/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/variables/Makefile
+++ b/Examples/php/variables/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/variables/example.c b/Examples/php/variables/example.c
index b21dee32d..d4c6d026d 100644
--- a/Examples/php/variables/example.c
+++ b/Examples/php/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %c%c%c%c%c\n", name[0],name[1],name[2],name[3],name[4]);
- printf("ptptr = %p %s\n", ptptr, Point_print( ptptr ) );
+ printf("ptptr = %p %s\n", (void *)ptptr, Point_print( ptptr ) );
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}