Completely ignore categories in the load bundle callback

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12793 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2002-02-26 17:36:13 +00:00
parent b20e127590
commit 1813380d88

View file

@ -386,20 +386,23 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
{
NSCAssert(_loadingBundle, NSInternalInconsistencyException);
/* We never record categories - if this is a category, just do nothing. */
if (theCategory != 0)
{
return;
}
/* Don't store the internal NSFramework_xxx class into the list of
bundle classes. */
if (strlen (theClass->name) > 12
&& !strncmp("NSFramework_", theClass->name, 12))
if (strlen (theClass->name) > 12 && !strncmp ("NSFramework_",
theClass->name, 12))
{
return;
}
/* Store classes, but don't store categories */
if (theCategory == 0)
{
[(NSMutableArray *)[_loadingBundle _bundleClasses] addObject:
[NSValue valueWithNonretainedObject: (id)theClass]];
}
/* Store classes (but don't store categories) */
[(NSMutableArray *)[_loadingBundle _bundleClasses] addObject:
[NSValue valueWithNonretainedObject: (id)theClass]];
}