mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
gnustep_bundle fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6591 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
61c2d74ec7
commit
64235f4fa4
2 changed files with 20 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2000-05-10 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
* NSBundle.m (-classNamed:): Hacks for getting classes from
|
||||||
|
_gnustep_bundle.
|
||||||
|
(-principalClass): Likewise.
|
||||||
|
(-load): Don't try to call load bundle if we are _gnustep_bundle.
|
||||||
|
|
||||||
2000-05-09 Richard Frith-Macdonald <rfm@gnu.org>
|
2000-05-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSDistantObject.m: ([-methodSignatureForSelector:])
|
* Source/NSDistantObject.m: ([-methodSignatureForSelector:])
|
||||||
|
|
|
@ -521,7 +521,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self == _mainBundle)
|
if (self == _mainBundle || self == _gnustep_bundle)
|
||||||
{
|
{
|
||||||
theClass = NSClassFromString(className);
|
theClass = NSClassFromString(className);
|
||||||
if (theClass && [[self class] bundleForClass:theClass] != _mainBundle)
|
if (theClass && [[self class] bundleForClass:theClass] != _mainBundle)
|
||||||
|
@ -546,7 +546,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
||||||
|
|
||||||
class_name = [[self infoDictionary] objectForKey: @"NSPrincipalClass"];
|
class_name = [[self infoDictionary] objectForKey: @"NSPrincipalClass"];
|
||||||
|
|
||||||
if (self == _mainBundle)
|
if (self == _mainBundle || self == _gnustep_bundle)
|
||||||
{
|
{
|
||||||
_codeLoaded = YES;
|
_codeLoaded = YES;
|
||||||
if (class_name)
|
if (class_name)
|
||||||
|
@ -566,11 +566,22 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
||||||
|
|
||||||
- (BOOL) load
|
- (BOOL) load
|
||||||
{
|
{
|
||||||
|
if (self == _mainBundle || self == _gnustep_bundle)
|
||||||
|
{
|
||||||
|
_codeLoaded = YES;
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
[load_lock lock];
|
[load_lock lock];
|
||||||
if (!_codeLoaded)
|
if (!_codeLoaded)
|
||||||
{
|
{
|
||||||
NSString* object;
|
NSString* object;
|
||||||
object = [[self infoDictionary] objectForKey: @"NSExecutable"];
|
object = [[self infoDictionary] objectForKey: @"NSExecutable"];
|
||||||
|
if (object == nil || [object length] == 0)
|
||||||
|
{
|
||||||
|
[load_lock unlock];
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
object = bundle_object_name(_path, object);
|
object = bundle_object_name(_path, object);
|
||||||
_loadingBundle = self;
|
_loadingBundle = self;
|
||||||
_bundleClasses = RETAIN([NSMutableArray arrayWithCapacity: 2]);
|
_bundleClasses = RETAIN([NSMutableArray arrayWithCapacity: 2]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue