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

@ -1,3 +1,11 @@
2001-05-28 Adam Fedor <fedor@gnu.org>
* Headers/gnustep/base/objc-gnu2next.h (class_is_class): New.
* Source/NSAssertionHandler.m (-handleFailureInMethod...): Use
OpenStep functions to get class/sel names.
* Source/NSBundle.m (+initialize): NeXT_RUNTIME method to find
classes.
2001-05-26 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Source/NSDebug.m (_NSPrintForDebugger): new function to support print

View file

@ -26,6 +26,10 @@ GNUstep-HOWTO is located in the gnustep-make package or at
If you are installing the GNUstep libraries individually, make sure you
have installed the GNUstep Makefile package (gnustep-make) already.
In addition you should probably install an Objective-C library (gnustep-objc),
as well some other libraries (notable ffcall). See the GNUstep-HOWTO for more
information.
When you configure this library, make sure you use the same
configuration options as with gstep-make. Some additional options to
configure are described below.

View file

@ -7,6 +7,22 @@
The currently released version of the library is
@samp{@value{GNUSTEP-BASE-VERSION}}.
@section Noteworthy changes in version @samp{1.0.1}
@itemize @bullet
@item Many fixes to work better with Darwin (still not there).
@item Fixes to work with BSD Unix
@item Added some missing methods, better conformance to MacOSX Docs.
@item Added support for invoking super implementation (mostly for writting
bridges from other languages).
@item Works better with gcc 3.x, newer kernels.
@item More memory debugging support.
@end itemize
@c ====================================================================
@c Keep the next line just below the list of changes in most recent version.
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{1.0.0}
@itemize @bullet
@ -16,10 +32,6 @@ The currently released version of the library is
@item Update unicode support and fixes
@end itemize
@c ====================================================================
@c Keep the next line just below the list of changes in most recent version.
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.9.1}
@itemize @bullet

View file

@ -107,6 +107,12 @@ objc_calloc(size_t nelem, size_t size);
void
objc_free(void *mem);
static inline BOOL
class_is_class(Class class)
{
return CLS_ISCLASS(class);
}
/*
** Hook functions for memory allocation and disposal.
** This makes it easy to substitute garbage collection systems

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>

View file

@ -32,6 +32,7 @@
#include <Foundation/NSUserDefaults.h>
#include <Foundation/NSDistributedNotificationCenter.h>
#include <stdio.h>
#include <unistd.h>
#include "gdnc.h"