Fix SF #1943608 - substitution in %contract.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10440 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-05-11 20:25:12 +00:00
commit 528ea7a313
3 changed files with 21 additions and 3 deletions

View file

@ -220,14 +220,14 @@ String *Contracts::make_expression(String *s, Node *n) {
/* This function substitutes parameter names for argument names in the
contract specification. Note: it is assumed that the wrapper code
uses arg1--argn for arguments. */
uses arg1 for self and arg2..argn for arguments. */
void Contracts::substitute_parms(String *s, ParmList *p, int method) {
int argnum = 1;
char argname[32];
if (method) {
Replaceid(s, "self", "arg0");
Replaceid(s, "$self", "arg1");
argnum++;
}
while (p) {