diff options
Diffstat (limited to 'src/cobj.h')
-rw-r--r-- | src/cobj.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -10,6 +10,7 @@ #endif /* __COBJ_IMPLS_H__ */ #if defined(__USE_C_OBJSYS__) +# undef CLASS # undef GETTER # undef SETTER # undef DEFINE @@ -18,6 +19,10 @@ # undef __USE_C_OBJSYS__ #elif defined(__COBJ_PRIV_IMPLS_H__) # define UNUSED(arg) while(0 && (arg)) +# define CLASS(klass, data) \ + typedef struct klass##_impl_struct data __ ## klass ## _impl +# define TYPE(klass) \ + __ ## klass ## _impl # define GETTER(klass, field, type, body, ...) \ type klass##_get_##field(klass self, ## __VA_ARGS__) \ body @@ -34,6 +39,8 @@ void klass ## _del(klass self, ## __VA_ARGS__) \ body #else +# define CLASS(klass) \ + typedef struct klass ## _impl_struct * klass # define GETTER(klass, field, type, ...) \ type klass##_get_##field(klass self, ## __VA_ARGS__) # define SETTER(klass, field, type, ...) \ |