[cairo-commit] rcairo/src rb_cairo_path.c,1.8,1.9

Kouhei Sutou commit at pdx.freedesktop.org
Tue May 22 04:41:57 PDT 2007


Committed by: kou

Update of /cvs/cairo/rcairo/src
In directory kemper:/tmp/cvs-serv24466/src

Modified Files:
	rb_cairo_path.c 
Log Message:
* src/rb_cairo_path.c: used super.


Index: rb_cairo_path.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_path.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- rb_cairo_path.c	22 May 2007 11:25:39 -0000	1.8
+++ rb_cairo_path.c	22 May 2007 11:41:45 -0000	1.9
@@ -152,6 +152,7 @@
 cr_path_move_to_initialize (int argc, VALUE *argv, VALUE self)
 {
   VALUE point, x, y;
+  VALUE super_argv[2];
 
   rb_scan_args (argc, argv, "11", &x, &y);
 
@@ -160,15 +161,17 @@
   else
     point = cr_point_new (x, y);
 
-  return cr_path_data_initialize (self,
-                                  INT2NUM (CAIRO_PATH_MOVE_TO),
-                                  rb_ary_new3 (1, point));
+  super_argv[0] = INT2NUM (CAIRO_PATH_MOVE_TO);
+  super_argv[1] = rb_ary_new3 (1, point);
+  rb_call_super (2, super_argv);
+  return Qnil;
 }
 
 static VALUE
 cr_path_line_to_initialize (int argc, VALUE *argv, VALUE self)
 {
   VALUE point, x, y;
+  VALUE super_argv[2];
 
   rb_scan_args (argc, argv, "11", &x, &y);
 
@@ -177,15 +180,17 @@
   else
     point = cr_point_new (x, y);
 
-  return cr_path_data_initialize (self,
-                                  INT2NUM (CAIRO_PATH_LINE_TO),
-                                  rb_ary_new3 (1, point));
+  super_argv[0] = INT2NUM (CAIRO_PATH_LINE_TO);
+  super_argv[1] = rb_ary_new3 (1, point);
+  rb_call_super (2, super_argv);
+  return Qnil;
 }
 
 static VALUE
 cr_path_curve_to_initialize (int argc, VALUE *argv, VALUE self)
 {
   VALUE point1, point2, point3, x1, y1, x2, y2, x3, y3;
+  VALUE super_argv[2];
 
   rb_scan_args (argc, argv, "33", &x1, &y1, &x2, &y2, &x3, &y3);
 
@@ -211,15 +216,20 @@
                 StringValuePtr (inspected_arg));
     }
 
-  return cr_path_data_initialize (self, INT2NUM (CAIRO_PATH_CURVE_TO),
-                                  rb_ary_new3 (3, point1, point2, point3));
+  super_argv[0] = INT2NUM (CAIRO_PATH_CURVE_TO);
+  super_argv[1] = rb_ary_new3 (3, point1, point2, point3);
+  rb_call_super (2, super_argv);
+  return Qnil;
 }
 
 static VALUE
 cr_path_close_path_initialize (VALUE self)
 {
-  return cr_path_data_initialize (self, INT2NUM (CAIRO_PATH_CLOSE_PATH),
-                                  rb_ary_new ());
+  VALUE super_argv[2];
+  super_argv[0] = INT2NUM (CAIRO_PATH_CLOSE_PATH);
+  super_argv[1] = rb_ary_new ();
+  rb_call_super (2, super_argv);
+  return Qnil;
 }
 
 



More information about the cairo-commit mailing list