mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
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:
parent
ee7eb89ab9
commit
ab97cd08af
9 changed files with 41 additions and 13 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue