mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@5111 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
853c667cc1
commit
d721ec45b5
1 changed files with 4 additions and 7 deletions
|
@ -606,19 +606,16 @@
|
|||
CASE_TYPE(_C_DBL, double);
|
||||
CASE_TYPE(_C_PTR, void*);
|
||||
case _C_STRUCT_B:
|
||||
default:
|
||||
#if defined(sparc) || defined(powerpc)
|
||||
/* FIXME: This only appears on sparc and ppc machines so far.
|
||||
structures appear to be aligned on word boundaries.
|
||||
Hopefully there is a more general way to figure this out */
|
||||
size = (size<sizeof(int))?4:size;
|
||||
#endif
|
||||
memcpy(datum, &va_arg(ap, typeof(struct{char x[size];})), size);
|
||||
break;
|
||||
default:
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Could not handle type of %d argument.", i-1];
|
||||
} /* default */
|
||||
NSLog(@"Unsafe handling of type of %d argument.", i-1];
|
||||
memcpy(datum, (char)va_arg(ap, int), copysize);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue