Headers and funcs for NeXT_RUNTIME

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10028 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-05-29 02:38:22 +00:00
parent aebbf39616
commit 3e68ec5016
10 changed files with 57 additions and 10 deletions

View file

@ -82,9 +82,9 @@ static NSString *dict_key = @"_NSAssertionHandler";
va_start(ap, format);
message =
[NSString
stringWithFormat: @"%@:%d Assertion failed in %s, method %s. %@",
fileName, line, object_get_class_name(object), sel_get_name(aSelector),
format];
stringWithFormat: @"%@:%d Assertion failed in %@, method %@. %@",
fileName, line, NSStringFromClass([object class]),
NSStringFromSelector(aSelector), format];
NSLogv(message, ap);
[NSException raise: NSInternalInconsistencyException

View file

@ -315,7 +315,7 @@ static NSString *lastFrameworkName = nil;
static NSBundle *lastFrameworkBundle = nil;
void
_bundle_load_callback(Class theClass, Category *theCategory)
_bundle_load_callback(Class theClass, struct objc_category *theCategory)
{
NSBundle *bundle = nil;
NSString *className;
@ -566,9 +566,23 @@ _bundle_load_callback(Class theClass, Category *theCategory)
handle = objc_open_main_module(stderr);
printf("%08x\n", handle);
#endif
#if NeXT_RUNTIME
{
int i, numClasses = 0, newNumClasses = objc_getClassList(NULL, 0);
Class *classes = NULL;
while (numClasses < newNumClasses) {
numClasses = newNumClasses;
classes = realloc(classes, sizeof(Class) * numClasses);
newNumClasses = objc_getClassList(classes, numClasses);
}
for (i = 0; i < numClasses; i++)
[NSBundle _addFrameworkFromClass: classes[i]];
free(classes);
}
#else
while ((class = objc_next_class(&state)))
[NSBundle _addFrameworkFromClass: class];
#endif
#if 0
// _bundle_load_callback(class, NULL);

View file

@ -1455,7 +1455,6 @@ static BOOL multi_threaded = NO;
/* type = [object selectorTypeForProxy: sel]; */
#else
type = sel_get_type(sel);
#endif
if (type == 0 || *type == '\0')
{
type = [[object methodSignatureForSelector: sel] methodType];
@ -1464,6 +1463,7 @@ static BOOL multi_threaded = NO;
sel_register_typed_name(sel_get_name(sel), type);
}
}
#endif
NSParameterAssert(type);
NSParameterAssert(*type);

View file

@ -74,6 +74,7 @@
#include <Foundation/NSRange.h>
#include <Foundation/NSURL.h>
#include <Foundation/NSZone.h>
#include <stdio.h>
#include <string.h> /* for memset() */
#include <unistd.h> /* SEEK_* on SunOS 4 */

View file

@ -24,6 +24,7 @@
*/
#include <config.h>
#include <stdio.h>
#include <Foundation/NSDebug.h>
#include <Foundation/NSString.h>
#include <Foundation/NSLock.h>