Skip to content

Commit

Permalink
Revert "Changes for compatibility with swig 2.x"
Browse files Browse the repository at this point in the history
This reverts commit e6929d2.

Although the fix for SWIG 2.x made the project compile successfully,
it did not function, complaining about problems with constructors and
destructors.  More work is needed to support SWIG 2.x.
  • Loading branch information
radarsat1 committed Nov 8, 2012
1 parent 45400e6 commit e9d3558
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions swig/mapper.i
Expand Up @@ -638,11 +638,11 @@ typedef struct _db {} db;
typedef struct _admin {} admin;

%extend device {
_device(const char *name, int port=0, admin *DISOWN=0) {
device(const char *name, int port=9000, admin *DISOWN=0) {
device *d = (device *)mdev_new(name, port, (mapper_admin) DISOWN);
return d;
}
~_device() {
~device() {
mdev_free((mapper_device)$self);
}
int poll(int timeout=0) {
Expand Down Expand Up @@ -1046,11 +1046,11 @@ typedef struct _admin {} admin;
}

%extend monitor {
_monitor(admin *DISOWN=0, int enable_autorequest=1) {
monitor(admin *DISOWN=0, int enable_autorequest=1) {
return (monitor *)mapper_monitor_new((mapper_admin) DISOWN,
enable_autorequest);
}
~_monitor() {
~monitor() {
mapper_monitor_free((mapper_monitor)$self);
}
int poll(int timeout=0) {
Expand Down Expand Up @@ -1315,10 +1315,10 @@ typedef struct _admin {} admin;
}

%extend admin {
_admin(const char *iface=0, const char *ip=0, int port=7570) {
admin(const char *iface=0, const char *ip=0, int port=7570) {
return (admin *)mapper_admin_new(iface, ip, port);
}
~_admin() {
~admin() {
mapper_admin_free((mapper_admin)$self);
}
}

0 comments on commit e9d3558

Please sign in to comment.