mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +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
|
@ -835,7 +835,14 @@ static IMP _xRefImp; /* Serialize a crossref. */
|
|||
|
||||
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)];
|
||||
}
|
||||
(*_dDesImp)(_src, dDesSel, address, type, &_cursor, nil);
|
||||
return;
|
||||
|
||||
|
@ -1559,7 +1566,7 @@ static IMP _xRefImp; /* Serialize a crossref. */
|
|||
|
||||
case _C_CHR:
|
||||
(*_eTagImp)(_dst, eTagSel, _GSC_CHR);
|
||||
(*_eSerImp)(_dst, eSerSel, (void*)buf, @encode(char), nil);
|
||||
(*_eSerImp)(_dst, eSerSel, (void*)buf, @encode(signed char), nil);
|
||||
return;
|
||||
|
||||
case _C_UCHR:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue