From a1bc88865c2ec5dc97135fae34d4c52328352e95 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 20 Sep 2003 15:12:21 +0000 Subject: [PATCH] First round of director mods - Removed asserts git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5133 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/java.cxx | 2 -- Source/Modules/ocaml.cxx | 4 ---- Source/Modules/python.cxx | 4 ---- Source/Modules/ruby.cxx | 4 ---- 4 files changed, 14 deletions(-) diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx index ff5a7c0fb..a8cec497f 100644 --- a/Source/Modules/java.cxx +++ b/Source/Modules/java.cxx @@ -2773,7 +2773,6 @@ class JAVA : public Language { /* Preamble code */ Printf(w->code, "jenv = __acquire_jenv();\n"); - Printf(w->code, "assert(jenv);\n"); Printf(w->code, "if (!__override[%d]) {\n", classmeth_off); if (!pure_virtual) { @@ -2823,7 +2822,6 @@ class JAVA : public Language { Delete(tp); } - Printf(w->code, "assert(__get_self());\n"); if (!recursive_upcall) { if (!is_const) Printf(w->code, "if (!__get_ricochet(%d)) {\n", classmeth_off); diff --git a/Source/Modules/ocaml.cxx b/Source/Modules/ocaml.cxx index 25b05afba..9e7bccf6c 100755 --- a/Source/Modules/ocaml.cxx +++ b/Source/Modules/ocaml.cxx @@ -1635,7 +1635,6 @@ public: Printf(wrap_args, "} else {\n"); Printf(wrap_args, "%s = %s->__get_self();\n", source, director); Printf(wrap_args, "}\n"); - Printf(wrap_args, "assert(%s);\n", source); Delete(director); Printv(arglist, source, NIL); } else { @@ -1674,9 +1673,6 @@ public: Printf(w->code, "CAMLreturn(%s);\n", Swig_method_call(super,l)); Printf(w->code, "}\n"); - /* check that we don't wrap a null... */ - Printv(w->code, "assert(__get_self());\n", NIL); - /* wrap complex arguments to values */ Printv(w->code, wrap_args, NIL); diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index d4ef40bcd..055232cb9 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -1422,7 +1422,6 @@ public: Printf(wrap_args, "%s = %s->__get_self();\n", source, director); Printf(wrap_args, "Py_INCREF(%s);\n", source); Printf(wrap_args, "}\n"); - Printf(wrap_args, "assert(%s);\n", source); Delete(director); Printv(arglist, source, NIL); } else { @@ -1470,9 +1469,6 @@ public: } Printf(w->code, "}\n"); - /* check that have a wrapped Python object */ - Printv(w->code, "assert(__get_self());\n", NIL); - /* wrap complex arguments to PyObjects */ Printv(w->code, wrap_args, NIL); diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx index 00d4aac07..adff94932 100644 --- a/Source/Modules/ruby.cxx +++ b/Source/Modules/ruby.cxx @@ -2382,7 +2382,6 @@ public: Printf(wrap_args, "} else {\n"); Printf(wrap_args, "%s = %s->__get_self();\n", source, director); Printf(wrap_args, "}\n"); - Printf(wrap_args, "assert(%s != Qnil);\n", source); Delete(director); Printv(arglist, source, NIL); } else { @@ -2429,9 +2428,6 @@ public: } Printf(w->code, "}\n"); - /* check that have a wrapped Ruby object */ - Printv(w->code, "assert(__get_self() != Qnil);\n", NIL); - /* wrap complex arguments to VALUEs */ Printv(w->code, wrap_args, NIL);