Fix portability of [un]signed char encodings

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9921 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-05-11 15:23:24 +00:00
parent ee7eb89ab9
commit ab97cd08af
9 changed files with 41 additions and 13 deletions

View file

@ -795,7 +795,14 @@ static Class NSDataMallocClass;
case _GSC_CHR:
case _GSC_UCHR:
typeCheck(*type, info & _GSC_MASK);
/* Encoding of chars is not consistant across platforms, so we
loosen the type checking a little */
if (*type != type_map[_GSC_CHR] && *type != type_map[_GSC_UCHR])
{
[NSException raise: NSInternalInconsistencyException
format: @"expected %s and got %s",
typeToName1(*type), typeToName2(info)];
}
(*desImp)(src, desSel, address, type, &cursor, nil);
return;