mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Implemented allBundles
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4075 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
05286efbe9
commit
a7f9d28f0d
2 changed files with 20 additions and 1 deletions
|
@ -267,7 +267,21 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
|
||||
+ (NSArray *) allBundles
|
||||
{
|
||||
return [self notImplemented: _cmd];
|
||||
NSMapEnumerator enumerate;
|
||||
NSMutableArray *array = [NSMutableArray arrayWithCapacity: 2];
|
||||
void *key;
|
||||
NSBundle *bundle;
|
||||
|
||||
enumerate = NSEnumerateMapTable(_bundles);
|
||||
while (NSNextMapEnumeratorPair(&enumerate, &key, (void **)&bundle))
|
||||
{
|
||||
if ([array indexOfObjectIdenticalTo: bundle] == NSNotFound)
|
||||
{
|
||||
/* FIXME - must ignore frameworks here */
|
||||
[array addObject: bundle];
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
+ (NSArray *) allFrameworks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue