You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
459 B
26 lines
459 B
#include <stdarg.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "class.h"
|
|
#include "interface.h"
|
|
|
|
void *
|
|
class_getInterface(class_ptr * class, iface_ptr _iface)
|
|
{
|
|
void * iface = (void *)IFACE_GET(*class, _iface);
|
|
|
|
while(NULL == iface && HAS_PARENT(*class)) {
|
|
*class = (*class)->parent;
|
|
iface = (void *)IFACE_GET(*class, _iface);
|
|
}
|
|
|
|
return iface;
|
|
}
|
|
|
|
class_ptr
|
|
class_getClass(void * object)
|
|
{
|
|
return *(class_ptr *)(object - sizeof(void*));
|
|
}
|
|
|
|
// vim: set ts=4 sw=4:
|