mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +00:00
Hacks for mframes with small structs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4693 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
272880ecea
commit
4f412b8c34
6 changed files with 110 additions and 0 deletions
|
@ -591,6 +591,15 @@
|
|||
CASE_TYPE(_C_FLT, float);
|
||||
CASE_TYPE(_C_DBL, double);
|
||||
CASE_TYPE(_C_PTR, void*);
|
||||
case _C_STRUCT_B:
|
||||
#if MFRAME_STRUCT_BYREF
|
||||
/* 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(char[size])), size);
|
||||
break;
|
||||
default:
|
||||
{
|
||||
memcpy(datum, va_arg(ap, typeof(char[size])), size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue