Fix handling of byte value 255 in input files on platforms where

char is signed (it was getting mapped to EOF).  Fixes SF#1518219.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10211 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2008-01-18 19:51:46 +00:00
commit ddb7c73411
3 changed files with 8 additions and 4 deletions

View file

@ -1,14 +1,18 @@
Version 1.3.34 (in progress)
============================
01/16/2007: wsfulton
01/18/2008: olly
Fix handling of byte value 255 in input files on platforms where
char is signed (it was getting mapped to EOF). Fixes SF#1518219.
01/16/2008: wsfulton
Fix template member variables wrapped by a smart pointer. Bug reported
by Robert Lupton.
01/14/2008: mgossage
Substantial changes to configure script for detecting lua.
Code can now link to liblua.a, liblua50.a or liblua51.a
Its also a lot neater now.
It's also a lot neater now.
12/16/2007: wsfulton
[Perl] Backed out #1798728 - numbers can be passed to functions taking char *

View file

@ -139,7 +139,7 @@ static int File_getc(DOH *fo) {
return fgetc(f->filep);
} else if (f->fd) {
#ifdef DOH_INTFILE
char c;
unsigned char c;
if (read(f->fd, &c, 1) < 0)
return EOF;
return c;

View file

@ -545,7 +545,7 @@ static int String_getc(DOH *so) {
if (s->sp >= s->len)
c = EOF;
else
c = (int) s->str[s->sp++];
c = (int)(unsigned char) s->str[s->sp++];
if (c == '\n')
s->line++;
return c;