};
`}
-extern A in "C" `{struct s_a*`}
+extern class A in "C" `{struct s_a*`}
new `{
struct s_a* v = malloc(sizeof(struct s_a));
v->x = 1;
return v;
`}
fun p `{
- printf( "A< %d %d >\n", recv->x, recv->y );
+ printf( "A< %d %d >\n", self->x, self->y );
`}
end
-extern B in "C" `{struct s_b*`}
+extern class B in "C" `{struct s_b*`}
super A
new `{
struct s_b* v = malloc(sizeof(struct s_b));
`}
redef fun p import super `{
printf( "B< " );
- B_p___super(recv);
- printf( " %d %d >\n", recv->w, recv->h );
+ B_p___super(self);
+ printf( " %d %d >\n", self->w, self->h );
`}
end
-extern C
+extern class C
super A
new `{
struct s_a* v = malloc(sizeof(struct s_a));
return v;
`}
redef fun p `{
- printf( "C< %d %d >\n", recv->x, recv->y );
+ printf( "C< %d %d >\n", self->x, self->y );
`}
end