Already spotted the first of likely many errors in my example:
> typedef struct {
> void[sizeof(struct __Child)] *direct_access_not_allowed;
> } Child_t;
I think this can just be "Child", as the macro Child() and type Child
shouldn't conflict.
> else {
> MyChild(self, result) = self->type[self->number];
> }
>
> return self->id;
> }
Oops, forgot to finish editing after I cut-and-paste my example:
int MyChild_prepare_result(MyChild *self) {
if (MyChild(self, field) == 1 && MyChild(self, subfield) == 2) {
MyChild(self, result) = MyChild(self, order);
}
else {
MyChild(self, result) = MyChild(self, type)[MyChild(self,number)];
}
return MyChild(self, id);
}
--nate