Initial commit
This commit is contained in:
commit
f222bb92af
9 changed files with 359 additions and 0 deletions
27
mini-obj-c.h
Normal file
27
mini-obj-c.h
Normal 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);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue