[ruamoko] Implement default -describe method on Object

It returns [classname@address], which is probably a reasonable default.
This commit is contained in:
Bill Currie 2022-09-09 14:03:30 +09:00
parent 019b40fb81
commit ee5e38b46c

View file

@ -1,5 +1,6 @@
#include <Object.h>
#include <AutoreleasePool.h>
#include <string.h>
static void link__obj_forward (void)
{
@ -367,4 +368,9 @@ typedef void arIMP(id, SEL, id);
return self;
}
- (string) describe
{
return sprintf ("[%s@%p]", object_get_class_name (self), self);
}
@end