Fixes for nsbundle

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6100 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-02-24 22:16:53 +00:00
parent a9dd1c2948
commit 2b534ae637
4 changed files with 1490 additions and 0 deletions

View file

@ -1,3 +1,10 @@
Thu Feb 24 21:05:00 2000 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSBundle.m: ([-initWithPath:]) added code suggested by
jagapen@whitewater.chem.wisc.edu to handle relative paths.
* Source/NSObject.m: Added catagory of 'Object' so that containers
can safely hold non-NSObject descended objects.
Thu Feb 24 15:55:00 2000 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/TcpPort.m: Removed some unused code.

1447
Source/GSTcpPort.m Normal file

File diff suppressed because it is too large Load diff

View file

@ -401,6 +401,12 @@ _bundle_load_callback(Class theClass, Category *theCategory)
NSLog(@"No path specified for bundle");
return nil;
}
if ([path isAbsolutePath] == NO)
{
NSLog(@"WARNING: NSBundle -initWithPath: requires absolute path names!");
path = [[[NSFileManager defaultManager] currentDirectoryPath]
stringByAppendingPathComponent: path];
}
/* Check if we were already initialized for this directory */
if (_bundles)

View file

@ -1409,3 +1409,33 @@ _fastMallocBuffer(unsigned size)
return ((void*)&o[1])+fastMallocOffset;
}
/*
* Stuff for compatibility with 'Object' derived classes.
*/
@interface Object (NSObjectCompat)
+ (void) release;
+ (id) retain;
- (void) release;
- (id) retain;
@end
@implementation Object (NSObjectCompat)
+ (void) release
{
return;
}
+ (id) retain
{
return self;
}
- (void) release
{
return;
}
- (id) retain
{
return self;
}
@end