renamed generic object pointer to traditional void *self
authorxchaos <xchaos@4bb87942-c103-4e5a-b51c-0ebff58f8515>
Thu, 10 Jan 2008 16:57:12 +0000 (16:57 +0000)
committerxchaos <xchaos@4bb87942-c103-4e5a-b51c-0ebff58f8515>
Thu, 10 Jan 2008 16:57:12 +0000 (16:57 +0000)
git-svn-id: https://dev.arachne.cz/repos/cll1h/trunk@9 4bb87942-c103-4e5a-b51c-0ebff58f8515

objects/cobjects.c

index 15f55d69f0c2d8fc27b13dfbea5c464ef7286be2..465231bd9fb7bb4d967b2ab989cda53126afbcc4 100644 (file)
@@ -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);
 };
 
This page took 0.185982 seconds and 4 git commands to generate.