fix confusion with --/++
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7982 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8c5cc36c49
commit
d7a6140c7a
1 changed files with 3 additions and 3 deletions
|
|
@ -508,7 +508,7 @@ DohString_putc(DOH *so, int ch)
|
|||
register int sp = s->sp;
|
||||
s->hashkey = -1;
|
||||
if (sp >= len) {
|
||||
register size_t maxsize = s->maxsize;
|
||||
register int maxsize = s->maxsize;
|
||||
register char *tc = s->str;
|
||||
if (len > (maxsize-2)) {
|
||||
maxsize *= 2;
|
||||
|
|
@ -540,7 +540,7 @@ DohString_getc(DOH *so)
|
|||
c = EOF;
|
||||
else
|
||||
c = (int) s->str[s->sp++];
|
||||
if (c == '\n') s->line--;
|
||||
if (c == '\n') s->line++;
|
||||
return c;
|
||||
}
|
||||
|
||||
|
|
@ -555,7 +555,7 @@ DohString_ungetc(DOH *so, int ch)
|
|||
if (ch == EOF) return ch;
|
||||
if (s->sp <= 0) return EOF;
|
||||
s->sp--;
|
||||
if (ch == '\n') s->line++;
|
||||
if (ch == '\n') s->line--;
|
||||
return ch;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue