mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
Fix for nonfragile-abi
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38825 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1abe6b4726
commit
befcb1f17d
3 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2015-07-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSConcreteHashTable.m:
|
||||
* Source/NSConcreteMapTable.m:
|
||||
Get instance size at run time, so we can compile using nonfragile-abi
|
||||
|
||||
2015-07-16 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* Source/GSSet.m
|
||||
|
|
|
@ -827,11 +827,14 @@ const NSHashTableCallBacks NSPointerToStructHashCallBacks =
|
|||
|
||||
@implementation NSConcreteHashTable
|
||||
|
||||
static unsigned instanceSize = 0;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
if (concreteClass == Nil)
|
||||
{
|
||||
concreteClass = [NSConcreteHashTable class];
|
||||
instanceSize = class_getInstanceSize(concreteClass);
|
||||
}
|
||||
#if GS_WITH_GC
|
||||
/* We create a typed memory descriptor for hash nodes.
|
||||
|
@ -1084,7 +1087,7 @@ const NSHashTableCallBacks NSPointerToStructHashCallBacks =
|
|||
* }
|
||||
* GSIMapEndEnumerator(&enumerator);
|
||||
*/
|
||||
size += GSIMapSize(self) - sizeof(GSI_MAP_TABLE_T);
|
||||
size += GSIMapSize(self) - instanceSize;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
|
|
@ -1185,11 +1185,14 @@ const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks =
|
|||
|
||||
@implementation NSConcreteMapTable
|
||||
|
||||
static unsigned instanceSize = 0;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
if (concreteClass == Nil)
|
||||
{
|
||||
concreteClass = [NSConcreteMapTable class];
|
||||
instanceSize = class_getInstanceSize(concreteClass);
|
||||
}
|
||||
#if GS_WITH_GC
|
||||
/* We create a typed memory descriptor for map nodes.
|
||||
|
@ -1450,7 +1453,7 @@ const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks =
|
|||
* }
|
||||
* GSIMapEndEnumerator(&enumerator);
|
||||
*/
|
||||
size += GSIMapSize(self) - sizeof(GSI_MAP_TABLE_T);
|
||||
size += GSIMapSize(self) - instanceSize;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue