[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnustep-base: GSInsensitiveDictionary.m on apple-apple-apple
From: |
Blake Nicholson |
Subject: |
gnustep-base: GSInsensitiveDictionary.m on apple-apple-apple |
Date: |
Wed, 12 Mar 2008 00:09:46 -0400 |
When building base (svn HEAD) with a library combo of apple-apple-
apple (on OS X 10.5.2), I received warnings about the implicit
declaration of GSDebugAllocationRemove and GSDebugAllocationAdd due to
the following function (lines 374-384 of GSInsensitiveDictionary.m):
- (id) makeImmutableCopyOnFail: (BOOL)force
{
#ifndef NDEBUG
GSDebugAllocationRemove(isa, self);
#endif
isa = [_GSInsensitiveDictionary class];
#ifndef NDEBUG
GSDebugAllocationAdd(isa, self);
#endif
return self;
}
The problem is that GSDebugAllocationAdd and GSDebugAllocationRemove
are declared in the gnustep-base version of NSDebug.h, which is not
used when building with apple-apple-apple. As a temporary fix, I did
the following:
- (id) makeImmutableCopyOnFail: (BOOL)force
{
#if !defined(NDEBUG) && defined(GNUSTEP)
GSDebugAllocationRemove(isa, self);
#endif
isa = [_GSInsensitiveDictionary class];
#if !defined(NDEBUG) && defined(GNUSTEP)
GSDebugAllocationAdd(isa, self);
#endif
return self;
}
What's the appropriate long-term fix for this? Should the GSDebug...
functions declared in NSDebug.h be moved to something that is part of
Additions (say GSDebug.h/GSDebug.m)?
As an aside, should I use "defined(GNUSTEP)" or
"defined(GNUSTEP_BASE_LIBRARY)"? Based upon base.make, these appear
to be synonymous, but the use of the GNUSTEP macro appears much more
common when looking through the rest of the codebase.
Thanks,
Blake
- gnustep-base: GSInsensitiveDictionary.m on apple-apple-apple,
Blake Nicholson <=