summaryrefslogtreecommitdiffstats
path: root/databases/gdl2/files/patch-581934
blob: 1374b2ec2d6b9125cf43ab2507b2f52b1185b0ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
2010-08-11  Yavor Doganov  <yavor@gnu.org>

	* EOControl/GNUmakefile (EOControl_INTERFACE_VERSION): Define
          as Debian-specific due to the ABI break.

2010-04-09  Fred Kiefer  <FredKiefer@gmx.de>

        * EOInterface/EOPopUpAssociation.m:
	* DBModeler/ModelerEntityEditor.m:
	* DBModeler/ModelerTableEmbedibleEditor.m: Add missing includes.

2010-04-07  David Ayers  <ayers@fsfe.org>

        * EOInterface/EOPopUpAssociation.m: Add missing include.
        Reported by: German Arias.

2010-03-15  Richard Frith-Macdonald  <rfm@gnu.org>

	* EOControl/EONSAddOns.h:
	* EOControl/EONSAddOns.m:
	* EOControl/EOKeyValueCoding.m:
	* EOControl/EOClassDescription.m:
	Rewrite mechanism to try to ensure that our implementations are used
	for KVC.  New version should work with the objc runtime API.

--- gnustep-dl2-0.12.0.orig/EOControl/EOClassDescription.m
+++ EOControl/EOClassDescription.m
@@ -739,17 +739,13 @@
 
 @end
 
-
-@implementation NSObject (EOClassDescriptionPrimitives)
-
-- (void)GDL2CDNSObjectICategoryID
-{
-}
+@interface GDL2CDNSObject : NSObject
+@end
+@implementation GDL2CDNSObject
 
 + (void)load
 {
-  GDL2_ActivateCategory("NSObject",
-                        @selector(GDL2CDNSObjectICategoryID), YES);
+  GDL2_Activate([self class], YES);
 }
 
 // when you enable the NSDebugMLLogs here you will have a loop. dave
--- gnustep-dl2-0.12.0.orig/EOControl/EOKeyValueCoding.m
+++ EOControl/EOKeyValueCoding.m
@@ -92,16 +92,13 @@
 #define INITIALIZE if (!initialized) initialize();
 
 
-@implementation NSObject (_EOKeyValueCodingCompatibility)
-
-- (void)GDL2KVCNSObjectICategoryID
-{
-}
+@interface	GDL2KVCNSObject : NSObject
+@end
+@implementation GDL2KVCNSObject
 
 + (void)load
 {
-  GDL2_ActivateCategory("NSObject",
-			@selector(GDL2KVCNSObjectICategoryID), YES);
+  GDL2_Activate([self class], YES);
 }
 
 
@@ -235,16 +232,13 @@
 @end
 
 
-@implementation NSArray (EOKeyValueCoding)
-
-- (void)GDL2KVCNSArrayICategoryID
-{
-}
+@interface	GDL2KVCNSArray : NSArray
+@end
+@implementation	GDL2KVCNSArray
 
 + (void)load
 {
-  GDL2_ActivateCategory("NSArray",
-			@selector(GDL2KVCNSArrayICategoryID), YES);
+  GDL2_Activate([self class], YES);
 }
 
 /**
@@ -543,16 +537,14 @@
 @end
 
 
-@implementation NSDictionary (EOKeyValueCoding)
+@interface	GDL2KVCNSDictionary : NSDictionary
+@end
+@implementation	GDL2KVCNSDictionary
 
-- (void)GDL2KVCNSDictionaryICategoryID
-{
-}
 
 + (void)load
 {
-  GDL2_ActivateCategory("NSDictionary",
-			@selector(GDL2KVCNSDictionaryICategoryID), YES);
+  GDL2_Activate([self class], YES);
 }
 
 /**
@@ -851,16 +843,13 @@
           isSmart: (BOOL)smartFlag;
 @end
 
-@implementation NSMutableDictionary (EOKVCGNUstepExtensions)
-
-- (void)GDL2KVCNSMutableDictionaryICategoryID
-{
-}
+@interface	GDL2KVCNSMutableDictionary : NSMutableDictionary
+@end
+@implementation GDL2KVCNSMutableDictionary
 
 + (void)load
 {
-  GDL2_ActivateCategory("NSMutableDictionary",
-			@selector(GDL2KVCNSMutableDictionaryICategoryID), YES);
+  GDL2_Activate([self class], YES);
 }
 
 /**
--- gnustep-dl2-0.12.0.orig/EOControl/EONSAddOns.h
+++ EOControl/EONSAddOns.h
@@ -51,7 +51,7 @@
 GSUseStrictWO451Compatibility(NSString *key);
 
 GDL2CONTROL_EXPORT void
-GDL2_ActivateCategory(const char *className, SEL sel, BOOL isInstance);
+GDL2_Activate(Class cls, BOOL isInstance);
 
 GDL2CONTROL_EXPORT void
 GDL2_ActivateAllGDL2Categories(void);
--- gnustep-dl2-0.12.0.orig/EOControl/EONSAddOns.m
+++ EOControl/EONSAddOns.m
@@ -64,6 +64,11 @@
 
 #include "EOPrivate.h"
 
+@class GDL2KVCNSObject;
+@class GDL2KVCNSArray;
+@class GDL2KVCNSDictionary;
+@class GDL2KVCNSMutableDictionary;
+@class GDL2CDNSObject;
 
 static NSRecursiveLock *local_lock = nil;
 static BOOL GSStrictWO451Flag = NO;
@@ -98,6 +103,7 @@
 void
 GDL2_DumpMethodList(Class cls, SEL sel, BOOL isInstance)
 {
+/*
   void *iterator = 0;
   GSMethodList mList;
   
@@ -113,39 +119,30 @@
 	      mList, meth, imp);
     }
   fprintf(stderr,"List finished\n"); fflush(stderr);
+*/
 }
 
 void
-GDL2_ActivateCategory(const char *className, SEL sel, BOOL isInstance)
+GDL2_Activate(Class cls, BOOL isInstance)
 {
-  Class cls;
-  GSMethodList mList;
-
-  cls = GSClassFromName(className);
-  mList = GSMethodListForSelector(cls, sel, 0, isInstance);
-
-  GSRemoveMethodList(cls, mList, isInstance);
-  GSAddMethodList(cls, mList, isInstance);
-
-  GSFlushMethodCacheForClass(cls);
+  if (NO == isInstance)
+    {
+      cls = object_getClass(cls);
+    }
+  GSObjCAddClassOverride([cls superclass], cls);
 }
 
 void
 GDL2_ActivateAllGDL2Categories(void)
 {
   /* EOKeyValueCoding */
-  GDL2_ActivateCategory("NSObject",
-                        @selector(GDL2KVCNSObjectICategoryID), YES);
-  GDL2_ActivateCategory("NSArray",
-			@selector(GDL2KVCNSArrayICategoryID), YES);
-  GDL2_ActivateCategory("NSDictionary",
-                        @selector(GDL2KVCNSDictionaryICategoryID), YES);
-  GDL2_ActivateCategory("NSMutableDictionary",
-                        @selector(GDL2KVCNSMutableDictionaryICategoryID), YES);
+  GDL2_Activate([GDL2KVCNSObject class], YES);
+  GDL2_Activate([GDL2KVCNSArray class], YES);
+  GDL2_Activate([GDL2KVCNSDictionary class], YES);
+  GDL2_Activate([GDL2KVCNSMutableDictionary class], YES);
 
   /* EOClassDescription */
-  GDL2_ActivateCategory("NSObject",
-                        @selector(GDL2CDNSObjectICategoryID), YES);
+  GDL2_Activate([GDL2CDNSObject class], YES);
 
 }
 
--- gnustep-dl2-0.12.0.orig/EOControl/GNUmakefile
+++ EOControl/GNUmakefile
@@ -29,6 +29,7 @@
 
 # The library to be compiled
 NATIVE_LIBRARY_NAME=EOControl
+EOControl_INTERFACE_VERSION=0d
 
 EOControl_NEEDS_GUI = no
 
--- gnustep-dl2-0.12.0.orig/EOInterface/EOPopUpAssociation.m
+++ EOInterface/EOPopUpAssociation.m
@@ -24,8 +24,10 @@
 */
 
 #ifdef GNUSTEP
-#include <Foundation/NSString.h>
 #include <Foundation/NSArray.h>
+#include <Foundation/NSString.h>
+#include <Foundation/NSException.h>
+#include <Foundation/NSValue.h>
 
 #include <AppKit/NSPopUpButton.h>
 #else
--- gnustep-dl2-0.12.0.orig/DBModeler/ModelerEntityEditor.m
+++ DBModeler/ModelerEntityEditor.m
@@ -40,6 +40,7 @@
 #ifdef NeXT_GUI_LIBRARY
 #include <AppKit/AppKit.h>
 #else
+#include <Foundation/NSRunLoop.h>
 #include <AppKit/NSImage.h>
 #include <AppKit/NSSplitView.h>
 #include <AppKit/NSScrollView.h>
--- gnustep-dl2-0.12.0.orig/DBModeler/ModelerTableEmbedibleEditor.m
+++ DBModeler/ModelerTableEmbedibleEditor.m
@@ -29,6 +29,8 @@
 #ifdef NeXT_GUI_LIBRARY
 #include <AppKit/AppKit.h>
 #else
+#include <Foundation/NSNotification.h>                                        
+#include <Foundation/NSUserDefaults.h>
 #include <AppKit/NSMenuItem.h>
 #include <AppKit/NSPopUpButton.h>
 #include <AppKit/NSTableColumn.h>
OpenPOWER on IntegriCloud