Initial commit

This commit is contained in:
ktkk 2026-10-20 10:12:45 +00:00
commit f222bb92af
9 changed files with 359 additions and 0 deletions

27
mini-obj-c.h Normal file
View file

@ -0,0 +1,27 @@
#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);