Contract assert macro modification to handle void and non-void return types

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5339 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-11-18 22:38:34 +00:00
commit 8d7f52dfc6
2 changed files with 6 additions and 0 deletions

View file

@ -696,6 +696,9 @@ class CSHARP : public Language {
/* Substitute the cleanup code */
Replaceall(f->code,"$cleanup",cleanup);
/* Contract macro modification */
Replaceall(f->code, "SWIG_contract_assert(", "SWIG_contract_assert($null, ");
if(!is_void_return)
Replaceall(f->code,"$null","0");
else

View file

@ -974,6 +974,9 @@ class JAVA : public Language {
/* Substitute the cleanup code */
Replaceall(f->code,"$cleanup",cleanup);
/* Contract macro modification */
Replaceall(f->code, "SWIG_contract_assert(", "SWIG_contract_assert($null, ");
if(!is_void_return)
Replaceall(f->code,"$null","0");
else