mini-obj-c/mini-obj-c.h
2026-10-20 10:12:45 +00:00

27 lines
418 B
C

#include <stddef.h>
struct Object
{
struct Class* class;
};
struct Class
{
struct Class* class;
const char* name;
struct Class* super;
struct Method* methods;
size_t methods_count;
};
typedef struct Object* (*MethodImplementation)(struct Object* self);
struct Method
{
const char* sel;
MethodImplementation impl;
};
struct Object* msg_send(struct Object* self, const char* sel);