mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
use objc_alognof_type()
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15149 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9b7dc8826d
commit
70215de5d2
2 changed files with 6 additions and 3 deletions
|
@ -21,6 +21,9 @@
|
||||||
windoze.
|
windoze.
|
||||||
* Source/NSArray.m: Write non-xml property lists as ascii.
|
* Source/NSArray.m: Write non-xml property lists as ascii.
|
||||||
* Source/NSDictionary.m: Write non-xml property lists as ascii.
|
* Source/NSDictionary.m: Write non-xml property lists as ascii.
|
||||||
|
* Source/mframe.m: use objc_alignof_type() as suggested by Roland
|
||||||
|
Schwingel. Long ago the objc runtime version was buggy so mframe
|
||||||
|
implemented its own algorithm. Now the objc runtime one is better.
|
||||||
|
|
||||||
2002-11-26 Richard Frith-Macdonald <rfm@gnu.org>
|
2002-11-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -359,9 +359,9 @@ mframe_next_arg(const char *typePtr, NSArgumentInfo *info)
|
||||||
|
|
||||||
case _C_STRUCT_B:
|
case _C_STRUCT_B:
|
||||||
{
|
{
|
||||||
struct { int x; double y; } fooalign;
|
|
||||||
int acc_size = 0;
|
int acc_size = 0;
|
||||||
int acc_align = __alignof__(fooalign);
|
int def_align = objc_alignof_type(typePtr-1);
|
||||||
|
int acc_align = def_align;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Skip "<name>=" stuff.
|
* Skip "<name>=" stuff.
|
||||||
|
@ -385,7 +385,7 @@ mframe_next_arg(const char *typePtr, NSArgumentInfo *info)
|
||||||
}
|
}
|
||||||
acc_size = ROUND(acc_size, local.align);
|
acc_size = ROUND(acc_size, local.align);
|
||||||
acc_size += local.size;
|
acc_size += local.size;
|
||||||
acc_align = MAX(local.align, __alignof__(fooalign));
|
acc_align = MAX(local.align, def_align);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Continue accumulating structure size.
|
* Continue accumulating structure size.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue