Inherit from NSObject, not Object.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@198 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1995-03-23 04:09:55 +00:00
parent d4a12ec0c6
commit 7a9646097c
4 changed files with 12 additions and 12 deletions

View file

@ -57,7 +57,7 @@ struct myarray {
@end
#endif
@interface Server : Object <ServerProtocol,InvalidationListening>
@interface Server : NSObject <ServerProtocol,InvalidationListening>
{
id theList;
}

View file

@ -198,7 +198,7 @@
int main()
{
id l = [[Server alloc] init];
id o = [[Object alloc] init];
id o = [[NSObject alloc] init];
double d;
Connection *c;

View file

@ -11,13 +11,13 @@ int main()
for (i = 0; i < N; i++)
{
[array addObject:[[Object alloc] init]];
[array addObject:[[[NSObject alloc] init] autorelease]];
}
[array makeObjectsPerform:@selector(name)];
[[array objectAtIndex:0] hash];
[[array releaseObjects] release];
[array release];
printf("no errors\n");
exit(0);
}

View file

@ -20,11 +20,11 @@ int main ()
a = [Array new];
[a prependObject: [Object new]];
[a prependObject: [Object new]];
[a prependObject: [Object new]];
[a prependObject: [NSObject new]];
[a prependObject: [NSObject new]];
[a prependObject: [NSObject new]];
printf("count: %d\n", [a count]);
[a insertObject: [Object new] atIndex: 2]; // ok!
[a insertObject: [NSObject new] atIndex: 2]; // ok!
printf("count: %d\n", [a count]);
c = [[CircularArray alloc] initWithType:@encode(int)];
@ -34,11 +34,11 @@ int main ()
[c insertElement:0 atIndex:2]; // core dump!
q = [Queue new];
[q enqueueObject: [Object new]];
[q enqueueObject: [Object new]];
[q enqueueObject: [Object new]];
[q enqueueObject: [NSObject new]];
[q enqueueObject: [NSObject new]];
[q enqueueObject: [NSObject new]];
printf("count: %d\n", [q count]);
[q insertObject: [Object new] atIndex: 2]; // core dump!
[q insertObject: [NSObject new] atIndex: 2]; // core dump!
printf("count: %d\n", [q count]);
return 0;
}