From a54e4bca7f286ec4bd3295adde6c57cf24d2e26a Mon Sep 17 00:00:00 2001 From: xchaos Date: Thu, 10 Jan 2008 16:57:12 +0000 Subject: [PATCH] renamed generic object pointer to traditional void *self git-svn-id: https://dev.arachne.cz/repos/cll1h/trunk@9 4bb87942-c103-4e5a-b51c-0ebff58f8515 --- objects/cobjects.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/objects/cobjects.c b/objects/cobjects.c index 15f55d6..465231b 100644 --- a/objects/cobjects.c +++ b/objects/cobjects.c @@ -12,7 +12,7 @@ struct Drawable_data struct Drawable_interface { - void (*draw)(struct Drawable_data *); + void (*draw)(void *self); }; struct Tri @@ -27,15 +27,15 @@ struct Rect int x1; int y1; int x2; int y2; }; -void draw_tri(struct Drawable_data *v) +void draw_tri(void *self) { - struct Tri *t=(struct Tri *)v; + struct Tri *t=(struct Tri *)self; printf("%d,%d - %d,%d - %d,%d\n",t->x1,t->y1,t->x2,t->y2,t->x3,t->y3); }; -void draw_rect(struct Drawable_data *v) +void draw_rect(void *self) { - struct Rect *r=(struct Rect *)v; + struct Rect *r=(struct Rect *)self; printf("%d,%d - %d,%d\n",r->x1,r->y1,r->x2,r->y2); }; -- 2.30.2