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:
parent
5cd23c3e50
commit
8d7f52dfc6
2 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue