mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-02-21 10:30:58 +00:00
update for new objc runtime
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@29958 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
34b5413f0f
commit
601409fef6
5 changed files with 48 additions and 57 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2010-03-07 Matt Rice <ratmice@gmail.com>
|
2010-03-07 Matt Rice <ratmice@gmail.com>
|
||||||
|
|
||||||
* DBModeler/DiagramView.m: Add missing include.
|
* DBModeler/DiagramView.m: Add missing include.
|
||||||
|
|
|
@ -739,17 +739,13 @@ fromInsertionInEditingContext: (EOEditingContext *)editingContext
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface GDL2CDNSObject : NSObject
|
||||||
@implementation NSObject (EOClassDescriptionPrimitives)
|
@end
|
||||||
|
@implementation GDL2CDNSObject
|
||||||
- (void)GDL2CDNSObjectICategoryID
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void)load
|
+ (void)load
|
||||||
{
|
{
|
||||||
GDL2_ActivateCategory("NSObject",
|
GDL2_Activate([self class], YES);
|
||||||
@selector(GDL2CDNSObjectICategoryID), YES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// when you enable the NSDebugMLLogs here you will have a loop. dave
|
// when you enable the NSDebugMLLogs here you will have a loop. dave
|
||||||
|
|
|
@ -92,16 +92,13 @@ initialize(void)
|
||||||
#define INITIALIZE if (!initialized) initialize();
|
#define INITIALIZE if (!initialized) initialize();
|
||||||
|
|
||||||
|
|
||||||
@implementation NSObject (_EOKeyValueCodingCompatibility)
|
@interface GDL2KVCNSObject : NSObject
|
||||||
|
@end
|
||||||
- (void)GDL2KVCNSObjectICategoryID
|
@implementation GDL2KVCNSObject
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void)load
|
+ (void)load
|
||||||
{
|
{
|
||||||
GDL2_ActivateCategory("NSObject",
|
GDL2_Activate([self class], YES);
|
||||||
@selector(GDL2KVCNSObjectICategoryID), YES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -235,16 +232,13 @@ initialize(void)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@implementation NSArray (EOKeyValueCoding)
|
@interface GDL2KVCNSArray : NSArray
|
||||||
|
@end
|
||||||
- (void)GDL2KVCNSArrayICategoryID
|
@implementation GDL2KVCNSArray
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void)load
|
+ (void)load
|
||||||
{
|
{
|
||||||
GDL2_ActivateCategory("NSArray",
|
GDL2_Activate([self class], YES);
|
||||||
@selector(GDL2KVCNSArrayICategoryID), YES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -543,16 +537,14 @@ initialize(void)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@implementation NSDictionary (EOKeyValueCoding)
|
@interface GDL2KVCNSDictionary : NSDictionary
|
||||||
|
@end
|
||||||
|
@implementation GDL2KVCNSDictionary
|
||||||
|
|
||||||
- (void)GDL2KVCNSDictionaryICategoryID
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void)load
|
+ (void)load
|
||||||
{
|
{
|
||||||
GDL2_ActivateCategory("NSDictionary",
|
GDL2_Activate([self class], YES);
|
||||||
@selector(GDL2KVCNSDictionaryICategoryID), YES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -851,16 +843,13 @@ initialize(void)
|
||||||
isSmart: (BOOL)smartFlag;
|
isSmart: (BOOL)smartFlag;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation NSMutableDictionary (EOKVCGNUstepExtensions)
|
@interface GDL2KVCNSMutableDictionary : NSMutableDictionary
|
||||||
|
@end
|
||||||
- (void)GDL2KVCNSMutableDictionaryICategoryID
|
@implementation GDL2KVCNSMutableDictionary
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void)load
|
+ (void)load
|
||||||
{
|
{
|
||||||
GDL2_ActivateCategory("NSMutableDictionary",
|
GDL2_Activate([self class], YES);
|
||||||
@selector(GDL2KVCNSMutableDictionaryICategoryID), YES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -51,7 +51,7 @@ GDL2CONTROL_EXPORT BOOL
|
||||||
GSUseStrictWO451Compatibility(NSString *key);
|
GSUseStrictWO451Compatibility(NSString *key);
|
||||||
|
|
||||||
GDL2CONTROL_EXPORT void
|
GDL2CONTROL_EXPORT void
|
||||||
GDL2_ActivateCategory(const char *className, SEL sel, BOOL isInstance);
|
GDL2_Activate(Class cls, BOOL isInstance);
|
||||||
|
|
||||||
GDL2CONTROL_EXPORT void
|
GDL2CONTROL_EXPORT void
|
||||||
GDL2_ActivateAllGDL2Categories(void);
|
GDL2_ActivateAllGDL2Categories(void);
|
||||||
|
|
|
@ -64,6 +64,11 @@ RCS_ID("$Id$")
|
||||||
|
|
||||||
#include "EOPrivate.h"
|
#include "EOPrivate.h"
|
||||||
|
|
||||||
|
@class GDL2KVCNSObject;
|
||||||
|
@class GDL2KVCNSArray;
|
||||||
|
@class GDL2KVCNSDictionary;
|
||||||
|
@class GDL2KVCNSMutableDictionary;
|
||||||
|
@class GDL2CDNSObject;
|
||||||
|
|
||||||
static NSRecursiveLock *local_lock = nil;
|
static NSRecursiveLock *local_lock = nil;
|
||||||
static BOOL GSStrictWO451Flag = NO;
|
static BOOL GSStrictWO451Flag = NO;
|
||||||
|
@ -98,6 +103,7 @@ GSUseStrictWO451Compatibility (NSString *key)
|
||||||
void
|
void
|
||||||
GDL2_DumpMethodList(Class cls, SEL sel, BOOL isInstance)
|
GDL2_DumpMethodList(Class cls, SEL sel, BOOL isInstance)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
void *iterator = 0;
|
void *iterator = 0;
|
||||||
GSMethodList mList;
|
GSMethodList mList;
|
||||||
|
|
||||||
|
@ -113,39 +119,30 @@ GDL2_DumpMethodList(Class cls, SEL sel, BOOL isInstance)
|
||||||
mList, meth, imp);
|
mList, meth, imp);
|
||||||
}
|
}
|
||||||
fprintf(stderr,"List finished\n"); fflush(stderr);
|
fprintf(stderr,"List finished\n"); fflush(stderr);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GDL2_ActivateCategory(const char *className, SEL sel, BOOL isInstance)
|
GDL2_Activate(Class cls, BOOL isInstance)
|
||||||
{
|
{
|
||||||
Class cls;
|
if (NO == isInstance)
|
||||||
GSMethodList mList;
|
{
|
||||||
|
cls = object_getClass(cls);
|
||||||
cls = GSClassFromName(className);
|
}
|
||||||
mList = GSMethodListForSelector(cls, sel, 0, isInstance);
|
GSObjCAddClassOverride([cls superclass], cls);
|
||||||
|
|
||||||
GSRemoveMethodList(cls, mList, isInstance);
|
|
||||||
GSAddMethodList(cls, mList, isInstance);
|
|
||||||
|
|
||||||
GSFlushMethodCacheForClass(cls);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GDL2_ActivateAllGDL2Categories(void)
|
GDL2_ActivateAllGDL2Categories(void)
|
||||||
{
|
{
|
||||||
/* EOKeyValueCoding */
|
/* EOKeyValueCoding */
|
||||||
GDL2_ActivateCategory("NSObject",
|
GDL2_Activate([GDL2KVCNSObject class], YES);
|
||||||
@selector(GDL2KVCNSObjectICategoryID), YES);
|
GDL2_Activate([GDL2KVCNSArray class], YES);
|
||||||
GDL2_ActivateCategory("NSArray",
|
GDL2_Activate([GDL2KVCNSDictionary class], YES);
|
||||||
@selector(GDL2KVCNSArrayICategoryID), YES);
|
GDL2_Activate([GDL2KVCNSMutableDictionary class], YES);
|
||||||
GDL2_ActivateCategory("NSDictionary",
|
|
||||||
@selector(GDL2KVCNSDictionaryICategoryID), YES);
|
|
||||||
GDL2_ActivateCategory("NSMutableDictionary",
|
|
||||||
@selector(GDL2KVCNSMutableDictionaryICategoryID), YES);
|
|
||||||
|
|
||||||
/* EOClassDescription */
|
/* EOClassDescription */
|
||||||
GDL2_ActivateCategory("NSObject",
|
GDL2_Activate([GDL2CDNSObject class], YES);
|
||||||
@selector(GDL2CDNSObjectICategoryID), YES);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue