mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
* Source/Additions/GSObjCRuntime.m
(GSObjCMethodNames): Unify implementation for both runtimes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19467 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4734fa0a7b
commit
b54f0a878b
2 changed files with 8 additions and 21 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-06-06 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Source/Additions/GSObjCRuntime.m
|
||||
(GSObjCMethodNames): Unify implementation for both runtimes.
|
||||
|
||||
2004-06-05 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Headers/Additions/GNUstepBase/GSObjCRuntime.h
|
||||
|
|
|
@ -204,7 +204,6 @@ GSObjCMethodNames(id obj)
|
|||
|
||||
while (class != nil)
|
||||
{
|
||||
#ifdef NeXT_RUNTIME
|
||||
void *iterator = 0;
|
||||
|
||||
while ((methods = class_nextMethodList(class, &iterator)) )
|
||||
|
@ -218,32 +217,15 @@ GSObjCMethodNames(id obj)
|
|||
if (method->method_name != 0)
|
||||
{
|
||||
NSString *name;
|
||||
const char *cName;
|
||||
|
||||
name = [[NSString alloc] initWithUTF8String:
|
||||
(const char *)method->method_name];
|
||||
cName = GSNameFromSelector(method->method_name);
|
||||
name = [[NSString alloc] initWithUTF8String: cName];
|
||||
[set addObject: name];
|
||||
RELEASE(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
methods = class->methods;
|
||||
while (methods != 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < methods->method_count; i++)
|
||||
{
|
||||
NSString *name;
|
||||
|
||||
name = [[NSString alloc] initWithUTF8String:
|
||||
GSNameFromSelector(methods->method_list[i].method_name)];
|
||||
[set addObject: name];
|
||||
RELEASE(name);
|
||||
}
|
||||
methods = methods->method_next;
|
||||
}
|
||||
#endif
|
||||
class = class->super_class;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue