mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
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:
parent
d4a12ec0c6
commit
7a9646097c
4 changed files with 12 additions and 12 deletions
|
@ -57,7 +57,7 @@ struct myarray {
|
|||
@end
|
||||
#endif
|
||||
|
||||
@interface Server : Object <ServerProtocol,InvalidationListening>
|
||||
@interface Server : NSObject <ServerProtocol,InvalidationListening>
|
||||
{
|
||||
id theList;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue