Author: rfm
Date: Fri Jul 24 21:59:05 2015
New Revision: 38838
URL: http://svn.gna.org/viewcvs/gnustep?rev=38838&view=rev
Log:
Another attempt to work with non-fragile abi
Modified:
libs/base/trunk/ChangeLog
libs/base/trunk/Headers/GNUstepBase/GSIMap.h
libs/base/trunk/Source/NSConcreteHashTable.m
libs/base/trunk/Source/NSConcreteMapTable.m
Modified: libs/base/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=38838&r1=38837&r2=38838&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog (original)
+++ libs/base/trunk/ChangeLog Fri Jul 24 21:59:05 2015
@@ -1,3 +1,10 @@
+2015-07-24 Richard Frith-Macdonald <[email protected]>
+
+ * Headers/GNUstepBase/GSIMap.h: add GSI_MAP_TABLE_S
+ * Source/NSConcreteHashTable.m:
+ * Source/NSConcreteMapTable.m:
+ Pass variable holding run time size calculation as GSI_MAP_TABLE_S
+
2015-07-22 Richard Frith-Macdonald <[email protected]>
* Source/NSConcreteHashTable.m:
Modified: libs/base/trunk/Headers/GNUstepBase/GSIMap.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Headers/GNUstepBase/GSIMap.h?rev=38838&r1=38837&r2=38838&view=diff
==============================================================================
--- libs/base/trunk/Headers/GNUstepBase/GSIMap.h (original)
+++ libs/base/trunk/Headers/GNUstepBase/GSIMap.h Fri Jul 24 21:59:05 2015
@@ -378,6 +378,10 @@
#define GSI_MAP_TABLE_T GSIMapTable_t
#endif
+#ifndef GSI_MAP_TABLE_S
+#define GSI_MAP_TABLE_S sizeof(GSI_MAP_TABLE_T)
+#endif
+
typedef struct _GSIMapEnumerator {
GSIMapTable map; /* the map being enumerated. */
GSIMapNode node; /* The next node to use. */
@@ -1269,7 +1273,7 @@
/* Map table plus arrays of pointers to chunks
*/
- size = sizeof(GSI_MAP_TABLE_T) + map->chunkCount * sizeof(void*);
+ size = GSI_MAP_TABLE_S + map->chunkCount * sizeof(void*);
/* Add the array of buckets.
*/
Modified: libs/base/trunk/Source/NSConcreteHashTable.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSConcreteHashTable.m?rev=38838&r1=38837&r2=38838&view=diff
==============================================================================
--- libs/base/trunk/Source/NSConcreteHashTable.m (original)
+++ libs/base/trunk/Source/NSConcreteHashTable.m Fri Jul 24 21:59:05 2015
@@ -41,6 +41,8 @@
#import "GSPrivate.h"
static Class concreteClass = Nil;
+static unsigned instanceSize = 0;
+
/* Here is the interface for the concrete class as used by the functions.
*/
@@ -73,6 +75,7 @@
#define GSI_MAP_HAS_VALUE 0
#define GSI_MAP_KTYPES GSUNION_PTR | GSUNION_OBJ
#define GSI_MAP_TABLE_T NSConcreteHashTable
+#define GSI_MAP_TABLE_S instanceSize
#define GSI_MAP_HASH(M, X)\
(M->legacy ? M->cb.old.hash(M, X.ptr) \
@@ -827,8 +830,6 @@
@implementation NSConcreteHashTable
-static unsigned instanceSize = 0;
-
+ (void) initialize
{
if (concreteClass == Nil)
Modified: libs/base/trunk/Source/NSConcreteMapTable.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSConcreteMapTable.m?rev=38838&r1=38837&r2=38838&view=diff
==============================================================================
--- libs/base/trunk/Source/NSConcreteMapTable.m (original)
+++ libs/base/trunk/Source/NSConcreteMapTable.m Fri Jul 24 21:59:05 2015
@@ -40,6 +40,8 @@
#import "NSCallBacks.h"
static Class concreteClass = Nil;
+static unsigned instanceSize = 0;
+
/* Here is the interface for the concrete class as used by the functions.
*/
@@ -76,6 +78,7 @@
@end
#define GSI_MAP_TABLE_T NSConcreteMapTable
+#define GSI_MAP_TABLE_S instanceSize
#define GSI_MAP_KTYPES GSUNION_PTR | GSUNION_OBJ
#define GSI_MAP_VTYPES GSUNION_PTR | GSUNION_OBJ
@@ -1185,8 +1188,6 @@
@implementation NSConcreteMapTable
-static unsigned instanceSize = 0;
-
+ (void) initialize
{
if (concreteClass == Nil)
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs