mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Cleanup to get rid of a few global variables
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23768 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a03a91b1ec
commit
183a5c2c87
7 changed files with 41 additions and 24 deletions
|
@ -1,6 +1,11 @@
|
|||
2006-10-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/GSMime.m: Add a couple more charset mappings.
|
||||
* Source/NSRunLoop.m: Move some variables to GSRunLoopCtxt.m
|
||||
* Source/GSHTTPURLHandle.m: Make a global static
|
||||
* Source/NSPort.m: Make two globals static
|
||||
* Source/unix/GSRunLoopCtxt.m: Make variable static.
|
||||
* Source/win32/GSRunLoopCtxt.m: Make variable static.
|
||||
|
||||
2006-10-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ typedef void (*NSMT_retain_func_t)(NSMapTable *, const void *);
|
|||
typedef void (*NSMT_release_func_t)(NSMapTable *, void *);
|
||||
typedef NSString *(*NSMT_describe_func_t)(NSMapTable *, const void *);
|
||||
|
||||
const NSMapTableKeyCallBacks writeKeyCallBacks =
|
||||
static const NSMapTableKeyCallBacks writeKeyCallBacks =
|
||||
{
|
||||
(NSMT_hash_func_t) _non_retained_id_hash,
|
||||
(NSMT_is_equal_func_t) _non_retained_id_is_equal,
|
||||
|
|
|
@ -669,7 +669,7 @@ typedef struct {
|
|||
@defs(NSBundle)
|
||||
} *bptr;
|
||||
|
||||
void
|
||||
static void
|
||||
_bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
||||
{
|
||||
NSCAssert(_loadingBundle, NSInternalInconsistencyException);
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
||||
<title>NSPort class reference</title>
|
||||
$Date$ $Revision$
|
||||
|
@ -53,8 +54,8 @@
|
|||
*/
|
||||
NSString * const NSPortTimeoutException = @"NSPortTimeoutException";
|
||||
|
||||
Class NSPort_abstract_class;
|
||||
Class NSPort_concrete_class;
|
||||
static Class NSPort_abstract_class;
|
||||
static Class NSPort_concrete_class;
|
||||
|
||||
+ (id) allocWithZone: (NSZone*)aZone
|
||||
{
|
||||
|
|
|
@ -632,11 +632,6 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1)
|
|||
|
||||
@end
|
||||
|
||||
extern SEL wRelSel;
|
||||
extern SEL wRetSel;
|
||||
extern IMP wRelImp;
|
||||
extern IMP wRetImp;
|
||||
|
||||
/**
|
||||
* <p><code>NSRunLoop</code> instances handle various utility tasks that must
|
||||
* be performed repetitively in an application, such as processing input
|
||||
|
@ -662,12 +657,6 @@ extern IMP wRetImp;
|
|||
{
|
||||
[self currentRunLoop];
|
||||
theFuture = RETAIN([NSDate distantFuture]);
|
||||
#if GS_WITH_GC == 0
|
||||
wRelSel = @selector(release);
|
||||
wRetSel = @selector(retain);
|
||||
wRelImp = [[GSRunLoopWatcher class] instanceMethodForSelector: wRelSel];
|
||||
wRetImp = [[GSRunLoopWatcher class] instanceMethodForSelector: wRetSel];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
extern BOOL GSCheckTasks();
|
||||
|
||||
#if GS_WITH_GC == 0
|
||||
SEL wRelSel;
|
||||
SEL wRetSel;
|
||||
IMP wRelImp;
|
||||
IMP wRetImp;
|
||||
static SEL wRelSel;
|
||||
static SEL wRetSel;
|
||||
static IMP wRelImp;
|
||||
static IMP wRetImp;
|
||||
|
||||
static void
|
||||
wRelease(NSMapTable* t, void* w)
|
||||
|
@ -61,6 +61,17 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
|
|||
#endif
|
||||
|
||||
@implementation GSRunLoopCtxt
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
#if GS_WITH_GC == 0
|
||||
wRelSel = @selector(release);
|
||||
wRetSel = @selector(retain);
|
||||
wRelImp = [[GSRunLoopWatcher class] instanceMethodForSelector: wRelSel];
|
||||
wRetImp = [[GSRunLoopWatcher class] instanceMethodForSelector: wRetSel];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
RELEASE(mode);
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
extern BOOL GSCheckTasks();
|
||||
|
||||
#if GS_WITH_GC == 0
|
||||
SEL wRelSel;
|
||||
SEL wRetSel;
|
||||
IMP wRelImp;
|
||||
IMP wRetImp;
|
||||
static SEL wRelSel;
|
||||
static SEL wRetSel;
|
||||
static IMP wRelImp;
|
||||
static IMP wRetImp;
|
||||
|
||||
static void
|
||||
wRelease(NSMapTable* t, void* w)
|
||||
|
@ -48,6 +48,17 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
|
|||
#endif
|
||||
|
||||
@implementation GSRunLoopCtxt
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
#if GS_WITH_GC == 0
|
||||
wRelSel = @selector(release);
|
||||
wRetSel = @selector(retain);
|
||||
wRelImp = [[GSRunLoopWatcher class] instanceMethodForSelector: wRelSel];
|
||||
wRetImp = [[GSRunLoopWatcher class] instanceMethodForSelector: wRetSel];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
RELEASE(mode);
|
||||
|
|
Loading…
Reference in a new issue