diff --git a/Lib/java/director.swg b/Lib/java/director.swg index 522e46722..dd20700d7 100644 --- a/Lib/java/director.swg +++ b/Lib/java/director.swg @@ -18,8 +18,6 @@ class __DIRECTOR__ { private: /* pointer to java virtual machine */ JavaVM *__jvm; - /* the default constructor should not be called */ - __DIRECTOR__(); protected: /* pointer to the wrapped java object */ @@ -27,13 +25,11 @@ protected: /* Acquire Java VM environment from Java VM */ JNIEnv *__acquire_jenv() const { JNIEnv *env; - assert(__jvm); __jvm->AttachCurrentThread((void **) &env, NULL); return env; } public: - /* Default constructor */ __DIRECTOR__(JNIEnv *jenv): __jvm((JavaVM *) NULL), __self(NULL) diff --git a/Lib/java/javahead.swg b/Lib/java/javahead.swg index cc1592395..872d56d7a 100644 --- a/Lib/java/javahead.swg +++ b/Lib/java/javahead.swg @@ -36,7 +36,6 @@ #include #include #include -#include %} %insert(runtime) %{ diff --git a/Lib/ocaml/director.swg b/Lib/ocaml/director.swg index 282fc147c..4e1a1dc78 100644 --- a/Lib/ocaml/director.swg +++ b/Lib/ocaml/director.swg @@ -11,7 +11,6 @@ %insert(runtime) %{ -#include #ifdef __cplusplus #include @@ -61,11 +60,6 @@ private: #endif public: - /* the default constructor should not be called */ - __DIRECTOR__() { - assert(0); - } - /* wrap a ocaml object, optionally taking ownership */ __DIRECTOR__(CAML_VALUE self, int disown): _self(self), _disown(disown) { register_global_root(&_self); @@ -125,7 +119,6 @@ public: /* acquire ownership of the wrapped ocaml object (the sense of "disown" * is from ocaml) */ void __disown() const { - assert(_self); if (!_disown) { _disown=1; callback(*caml_named_value("caml_obj_disown"),_self); diff --git a/Lib/python/director.swg b/Lib/python/director.swg index 7f7f1c5e6..47218cb7b 100644 --- a/Lib/python/director.swg +++ b/Lib/python/director.swg @@ -73,7 +73,6 @@ private: /* decrement the reference count of the wrapped python object */ void __decref() const { - assert(_self); if (_disown) { Py_DECREF(_self); } @@ -93,11 +92,6 @@ private: #endif public: - /* the default constructor should not be called */ - __DIRECTOR__() { - assert(0); - } - /* wrap a python object, optionally taking ownership */ __DIRECTOR__(PyObject* self, int disown): _self(self), _disown(disown) { __incref(); @@ -155,7 +149,6 @@ public: /* acquire ownership of the wrapped python object (the sense of "disown" * is from python) */ void __disown() const { - assert(_self); if (!_disown) { _disown=1; __incref(); @@ -164,7 +157,6 @@ public: /* increase the reference count of the wrapped python object */ void __incref() const { - assert(_self); if (_disown) { Py_INCREF(_self); } diff --git a/Lib/python/python.swg b/Lib/python/python.swg index 7f8a47a6c..dcd9520d4 100644 --- a/Lib/python/python.swg +++ b/Lib/python/python.swg @@ -473,7 +473,6 @@ } else { $input = proxy->__get_self(); } - assert($input); } } %typemap(inv) SWIGTYPE * { diff --git a/Lib/ruby/director.swg b/Lib/ruby/director.swg index 9ad1667d0..809abec92 100644 --- a/Lib/ruby/director.swg +++ b/Lib/ruby/director.swg @@ -11,7 +11,6 @@ #ifdef __cplusplus -#include #include struct swig_body_args @@ -99,11 +98,6 @@ private: #endif public: - /* the default constructor should not be called */ - __DIRECTOR__() { - assert(false); - } - /* wrap a Ruby object, optionally taking ownership */ __DIRECTOR__(VALUE self, bool disown) : _self(self), _disown(disown) { } @@ -159,7 +153,6 @@ public: /* acquire ownership of the wrapped Ruby object (the sense of "disown" * is from Ruby) */ void __disown() const { - assert(_self); if (!_disown) { _disown = true; } diff --git a/Lib/ruby/ruby.swg b/Lib/ruby/ruby.swg index fe4728523..397c8d7a6 100644 --- a/Lib/ruby/ruby.swg +++ b/Lib/ruby/ruby.swg @@ -431,7 +431,6 @@ } else { $input = proxy->__get_self(); } - assert($input); } } %typemap(inv) SWIGTYPE * {