Skip to content

Commit

Permalink
Add prefix to CONCRETE_CLASS_NAME macro
Browse files Browse the repository at this point in the history
  • Loading branch information
hmelder committed Oct 10, 2024
1 parent e95e5a1 commit c2427a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Source/NSDate.m
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ @interface GSDateFuture : GSDateSingle

#endif

@implementation CONCRETE_CLASS_NAME
@implementation DATE_CONCRETE_CLASS_NAME

#if USE_SMALL_DATE

Expand Down Expand Up @@ -679,7 +679,7 @@ + (void) initialize
{
[self setVersion: 1];
abstractClass = self;
concreteClass = [CONCRETE_CLASS_NAME class];
concreteClass = [DATE_CONCRETE_CLASS_NAME class];
calendarClass = [NSCalendarDate class];
}
}
Expand All @@ -689,7 +689,7 @@ + (id) alloc
if (self == abstractClass)
{
#if USE_SMALL_DATE
return [CONCRETE_CLASS_NAME alloc]; // alloc is overridden to return a small object
return [DATE_CONCRETE_CLASS_NAME alloc]; // alloc is overridden to return a small object
#else
return NSAllocateObject(concreteClass, 0, NSDefaultMallocZone());
#endif
Expand All @@ -702,7 +702,7 @@ + (id) allocWithZone: (NSZone*)z
if (self == abstractClass)
{
#if USE_SMALL_DATE
return [CONCRETE_CLASS_NAME alloc]; // alloc is overridden to return a small object
return [DATE_CONCRETE_CLASS_NAME alloc]; // alloc is overridden to return a small object
#else
return NSAllocateObject(concreteClass, 0, z);
#endif
Expand Down
7 changes: 3 additions & 4 deletions Source/NSDatePrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@

#if defined(OBJC_SMALL_OBJECT_SHIFT) && (OBJC_SMALL_OBJECT_SHIFT == 3)
#define USE_SMALL_DATE 1
// FIXME: Change to DATE_CONCRETE_CLASS_NAME
#define CONCRETE_CLASS_NAME GSSmallDate
#define DATE_CONCRETE_CLASS_NAME GSSmallDate
#else
#define USE_SMALL_DATE 0
#define CONCRETE_CLASS_NAME = NSGDate
#define DATE_CONCRETE_CLASS_NAME NSGDate
#endif

@interface CONCRETE_CLASS_NAME : NSDate
@interface DATE_CONCRETE_CLASS_NAME : NSDate
#if USE_SMALL_DATE == 0
{
@public
Expand Down
2 changes: 1 addition & 1 deletion Source/NSTimer.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ + (void) initialize
{
if (self == [NSTimer class])
{
NSDate_class = [CONCRETE_CLASS_NAME class];
NSDate_class = [DATE_CONCRETE_CLASS_NAME class];
}
}

Expand Down

0 comments on commit c2427a8

Please sign in to comment.