mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 12:55:44 +00:00
* EOControl/EONull.h/m ([NSObject isEONull], [NSObject isNotEONull])
(isNilOrEONull): Remove. * EOControl/EOPriv.h (_isNilOrEONull): Make static inline function. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20718 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
11bb2e78a7
commit
f64e9903ac
4 changed files with 12 additions and 32 deletions
|
@ -23,6 +23,9 @@
|
|||
(-updatedObjects, -insertedObjects, -deletedObjects): Reimplement.
|
||||
(-unprocessedObjects, -unprocessedInfo, -pendingInfo)
|
||||
(-hasUnprocessedChanges): Remove.
|
||||
* EOControl/EONull.h/m ([NSObject isEONull], [NSObject isNotEONull])
|
||||
(isNilOrEONull): Remove.
|
||||
* EOControl/EOPriv.h (_isNilOrEONull): Make static inline function.
|
||||
|
||||
2005-02-13 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
* EOControl/EOClassDescription.m:
|
||||
|
|
|
@ -43,13 +43,5 @@
|
|||
- (NSString *)sqlString;
|
||||
@end
|
||||
|
||||
@interface NSObject (EONullTest)
|
||||
- (BOOL)isEONull;
|
||||
- (BOOL)isNotEONull;
|
||||
@end
|
||||
|
||||
GDL2CONTROL_EXPORT BOOL isNilOrEONull(id v);
|
||||
|
||||
|
||||
#endif /* __EONull_h__ */
|
||||
|
||||
|
|
|
@ -71,28 +71,9 @@ RCS_ID("$Id$")
|
|||
@end
|
||||
|
||||
|
||||
@implementation NSObject (EONull)
|
||||
|
||||
- (BOOL)isEONull
|
||||
{
|
||||
return ((id)self == [NSNull null]);
|
||||
}
|
||||
|
||||
- (BOOL)isNotEONull
|
||||
{
|
||||
return ![self isEONull];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
BOOL isNilOrEONull(id v)
|
||||
{
|
||||
return ((!v) || [v isEONull]);
|
||||
}
|
||||
|
||||
/*
|
||||
* We keep this class to support NSClassFromString() which
|
||||
* scripting libraries my depend on. Note that this is
|
||||
* scripting libraries may depend on. Note that this is
|
||||
* not a fail-safe implementation. You should rely on
|
||||
* [EONull+null] and pointer comparison. Do not rely on
|
||||
* [obj isKindOfClass: NSClassFromString(@"EONull")]
|
||||
|
|
|
@ -154,10 +154,14 @@ GDL2CONTROL_EXPORT void GDL2PrivInit();
|
|||
|
||||
// ==== IMP Helpers ====
|
||||
|
||||
#define _isNilOrEONull(v) \
|
||||
(isNilOrEONull(v))
|
||||
|
||||
// (((v)==nil || (v)==GDL2EONull) ? YES : NO)
|
||||
static inline BOOL
|
||||
_isNilOrEONull(id obj) __attribute__ ((unused));
|
||||
static inline BOOL
|
||||
_isNilOrEONull(id obj)
|
||||
{
|
||||
if (GDL2EONull == nil) GDL2PrivInit();
|
||||
return (obj == nil || obj == GDL2EONull) ? YES : NO;
|
||||
}
|
||||
|
||||
//See also EOControl/EOFault.m
|
||||
#define _isFault(v) \
|
||||
|
|
Loading…
Reference in a new issue