[cairo-commit] pycairo/cairo pycairo-context.c, 1.50, 1.51 pycairo-surface.c, 1.36, 1.37 pycairo-pattern.c, 1.19, 1.20 pycairo-matrix.c, 1.16, 1.17 pycairo-font.c, 1.15, 1.16

Steve Chaplin commit at pdx.freedesktop.org
Wed May 11 17:00:10 PDT 2005


Committed by: stevech1097

Update of /cvs/cairo/pycairo/cairo
In directory gabe:/tmp/cvs-serv16913/cairo

Modified Files:
	pycairo-context.c pycairo-surface.c pycairo-pattern.c 
	pycairo-matrix.c pycairo-font.c 
Log Message:
SC

Index: pycairo-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-context.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- pycairo-context.c	11 May 2005 06:22:53 -0000	1.50
+++ pycairo-context.c	12 May 2005 00:00:08 -0000	1.51
@@ -1073,94 +1073,93 @@
      * cairo_destroy()
      * cairo_reference()
      */
-    { "append_path",    (PyCFunction)pycairo_append_path,   METH_VARARGS },
-    { "arc",            (PyCFunction)pycairo_arc,           METH_VARARGS },
-    { "arc_negative",   (PyCFunction)pycairo_arc_negative,  METH_VARARGS },
-    { "clip",           (PyCFunction)pycairo_clip,          METH_NOARGS },
-    { "clip_preserve",  (PyCFunction)pycairo_clip_preserve, METH_NOARGS },
-    { "close_path",     (PyCFunction)pycairo_close_path,    METH_NOARGS },
-    { "copy_page",      (PyCFunction)pycairo_copy_page,     METH_NOARGS },
-    { "copy_path",      (PyCFunction)pycairo_copy_path,     METH_NOARGS },
-    { "copy_path_flat", (PyCFunction)pycairo_copy_path_flat,METH_NOARGS },
-    { "curve_to",       (PyCFunction)pycairo_curve_to,      METH_VARARGS },
-    { "device_to_user", (PyCFunction)pycairo_device_to_user,METH_VARARGS },
-    { "device_to_user_distance",
-       (PyCFunction)pycairo_device_to_user_distance,        METH_VARARGS },
-    { "fill",           (PyCFunction)pycairo_fill,          METH_NOARGS },
-    { "fill_preserve",  (PyCFunction)pycairo_fill_preserve, METH_NOARGS },
+    {"append_path",     (PyCFunction)pycairo_append_path,    METH_VARARGS},
+    {"arc",             (PyCFunction)pycairo_arc,            METH_VARARGS},
+    {"arc_negative",    (PyCFunction)pycairo_arc_negative,   METH_VARARGS},
+    {"clip",            (PyCFunction)pycairo_clip,           METH_NOARGS},
+    {"clip_preserve",   (PyCFunction)pycairo_clip_preserve,  METH_NOARGS},
+    {"close_path",      (PyCFunction)pycairo_close_path,     METH_NOARGS},
+    {"copy_page",       (PyCFunction)pycairo_copy_page,      METH_NOARGS},
+    {"copy_path",       (PyCFunction)pycairo_copy_path,      METH_NOARGS},
+    {"copy_path_flat",  (PyCFunction)pycairo_copy_path_flat, METH_NOARGS},
+    {"curve_to",        (PyCFunction)pycairo_curve_to,       METH_VARARGS},
+    {"device_to_user",  (PyCFunction)pycairo_device_to_user, METH_VARARGS},
+    {"device_to_user_distance",
+               (PyCFunction)pycairo_device_to_user_distance, METH_VARARGS},
+    {"fill",            (PyCFunction)pycairo_fill,           METH_NOARGS},
+    {"fill_preserve",   (PyCFunction)pycairo_fill_preserve,  METH_NOARGS},
+    {"get_fill_rule",   (PyCFunction)pycairo_get_fill_rule,  METH_NOARGS},
+    {"get_font_face",   (PyCFunction)pycairo_get_font_face,  METH_NOARGS},
+    {"get_font_matrix", (PyCFunction)pycairo_get_font_matrix,METH_NOARGS},
+    {"get_line_cap",    (PyCFunction)pycairo_get_line_cap,   METH_NOARGS},
+    {"get_line_join",   (PyCFunction)pycairo_get_line_join,  METH_NOARGS},
+    {"get_line_width",  (PyCFunction)pycairo_get_line_width, METH_NOARGS},
+    {"get_matrix",      (PyCFunction)pycairo_get_matrix,     METH_NOARGS},
+    {"get_miter_limit", (PyCFunction)pycairo_get_miter_limit,METH_NOARGS},
+    {"get_operator",    (PyCFunction)pycairo_get_operator,   METH_NOARGS},
+    {"get_source",      (PyCFunction)pycairo_get_source,     METH_NOARGS},
+    {"get_tolerance",   (PyCFunction)pycairo_get_tolerance,  METH_NOARGS},
     /* glyph_extents */
     /* glyph_path    - undocumented */
-    { "identity_matrix",(PyCFunction)pycairo_identity_matrix,METH_NOARGS },
-    { "in_fill",        (PyCFunction)pycairo_in_fill,       METH_VARARGS },
-    { "in_stroke",      (PyCFunction)pycairo_in_stroke,     METH_VARARGS },
-    { "line_to",        (PyCFunction)pycairo_line_to,       METH_VARARGS },
-    { "mask",           (PyCFunction)pycairo_move_to,       METH_VARARGS },
-    { "mask_surface",   (PyCFunction)pycairo_move_to,       METH_VARARGS },
-    { "move_to",        (PyCFunction)pycairo_move_to,       METH_VARARGS },
-    { "new_path",       (PyCFunction)pycairo_new_path,      METH_NOARGS },
-    { "paint",          (PyCFunction)pycairo_paint,         METH_NOARGS },
-    { "paint_with_alpha",(PyCFunction)pycairo_paint_with_alpha,
-                                                            METH_VARARGS },
-    { "rectangle",      (PyCFunction)pycairo_rectangle,     METH_VARARGS },
-    { "rel_curve_to",   (PyCFunction)pycairo_rel_curve_to,  METH_VARARGS },
-    { "rel_line_to",    (PyCFunction)pycairo_rel_line_to,   METH_VARARGS },
-    { "rel_move_to",    (PyCFunction)pycairo_rel_move_to,   METH_VARARGS },
-    { "reset_clip",     (PyCFunction)pycairo_reset_clip,    METH_NOARGS },
-    { "restore",        (PyCFunction)pycairo_restore,       METH_NOARGS },
-    { "rotate",         (PyCFunction)pycairo_rotate,        METH_VARARGS },
-    { "save",           (PyCFunction)pycairo_save,          METH_NOARGS },
-    { "scale",          (PyCFunction)pycairo_scale,         METH_VARARGS },
-    { "select_font_face",(PyCFunction)pycairo_select_font_face,METH_VARARGS },
-    { "set_dash",       (PyCFunction)pycairo_set_dash,      METH_VARARGS },
-    { "set_fill_rule",  (PyCFunction)pycairo_set_fill_rule, METH_VARARGS },
-    { "set_font_face",  (PyCFunction)pycairo_set_font_face, METH_O },
-    { "set_font_matrix",(PyCFunction)pycairo_set_font_matrix,METH_VARARGS },
-    { "set_font_size",  (PyCFunction)pycairo_set_font_size, METH_VARARGS },
-    { "set_line_cap",   (PyCFunction)pycairo_set_line_cap,  METH_VARARGS },
-    { "set_line_join",  (PyCFunction)pycairo_set_line_join, METH_VARARGS },
-    { "set_line_width", (PyCFunction)pycairo_set_line_width,METH_VARARGS },
-    { "set_matrix",     (PyCFunction)pycairo_set_matrix,    METH_VARARGS },
-    { "set_miter_limit",(PyCFunction)pycairo_set_miter_limit,METH_VARARGS },
-    { "set_operator",   (PyCFunction)pycairo_set_operator,  METH_VARARGS },
-    { "set_source",     (PyCFunction)pycairo_set_source,    METH_VARARGS },
-    { "set_source_rgb", (PyCFunction)pycairo_set_source_rgb,METH_VARARGS },
-    { "set_source_rgba",(PyCFunction)pycairo_set_source_rgba,METH_VARARGS },
-    { "set_source_surface",(PyCFunction)pycairo_set_source_surface,  
-                                                            METH_VARARGS },
-    { "set_tolerance",  (PyCFunction)pycairo_set_tolerance, METH_VARARGS },
+    {"identity_matrix", (PyCFunction)pycairo_identity_matrix,METH_NOARGS},
+    {"in_fill",         (PyCFunction)pycairo_in_fill,        METH_VARARGS},
+    {"in_stroke",       (PyCFunction)pycairo_in_stroke,      METH_VARARGS},
+    {"line_to",         (PyCFunction)pycairo_line_to,        METH_VARARGS},
+    {"mask",            (PyCFunction)pycairo_move_to,        METH_VARARGS},
+    {"mask_surface",    (PyCFunction)pycairo_move_to,        METH_VARARGS},
+    {"move_to",         (PyCFunction)pycairo_move_to,        METH_VARARGS},
+    {"new_path",        (PyCFunction)pycairo_new_path,       METH_NOARGS},
+    {"paint",           (PyCFunction)pycairo_paint,          METH_NOARGS},
+    {"paint_with_alpha",(PyCFunction)pycairo_paint_with_alpha,METH_VARARGS},
+    {"rectangle",       (PyCFunction)pycairo_rectangle,      METH_VARARGS},
+    {"rel_curve_to",    (PyCFunction)pycairo_rel_curve_to,   METH_VARARGS},
+    {"rel_line_to",     (PyCFunction)pycairo_rel_line_to,    METH_VARARGS},
+    {"rel_move_to",     (PyCFunction)pycairo_rel_move_to,    METH_VARARGS},
+    {"reset_clip",      (PyCFunction)pycairo_reset_clip,     METH_NOARGS},
+    {"restore",         (PyCFunction)pycairo_restore,        METH_NOARGS},
+    {"rotate",          (PyCFunction)pycairo_rotate,         METH_VARARGS},
+    {"save",            (PyCFunction)pycairo_save,           METH_NOARGS},
+    {"scale",           (PyCFunction)pycairo_scale,          METH_VARARGS},
+    {"select_font_face",(PyCFunction)pycairo_select_font_face,METH_VARARGS},
+    {"set_dash",        (PyCFunction)pycairo_set_dash,       METH_VARARGS},
+    {"set_fill_rule",   (PyCFunction)pycairo_set_fill_rule,  METH_VARARGS},
+    {"set_font_face",   (PyCFunction)pycairo_set_font_face,  METH_O},
+    {"set_font_matrix", (PyCFunction)pycairo_set_font_matrix,METH_VARARGS},
+    {"set_font_size",   (PyCFunction)pycairo_set_font_size,  METH_VARARGS},
+    {"set_line_cap",    (PyCFunction)pycairo_set_line_cap,   METH_VARARGS},
+    {"set_line_join",   (PyCFunction)pycairo_set_line_join,  METH_VARARGS},
+    {"set_line_width",  (PyCFunction)pycairo_set_line_width, METH_VARARGS},
+    {"set_matrix",      (PyCFunction)pycairo_set_matrix,     METH_VARARGS},
+    {"set_miter_limit", (PyCFunction)pycairo_set_miter_limit,METH_VARARGS},
+    {"set_operator",    (PyCFunction)pycairo_set_operator,   METH_VARARGS},
+    {"set_source",      (PyCFunction)pycairo_set_source,     METH_VARARGS},
+    {"set_source_rgb",  (PyCFunction)pycairo_set_source_rgb, METH_VARARGS},
+    {"set_source_rgba", (PyCFunction)pycairo_set_source_rgba,METH_VARARGS},
+    {"set_source_surface",(PyCFunction)pycairo_set_source_surface,  
+                                                             METH_VARARGS},
+    {"set_tolerance",   (PyCFunction)pycairo_set_tolerance,  METH_VARARGS},
     /* show_glyphs - undocumented */
-    { "show_page",      (PyCFunction)pycairo_show_page,     METH_NOARGS },
-    { "show_text",      (PyCFunction)pycairo_show_text,     METH_VARARGS },
-    { "stroke",         (PyCFunction)pycairo_stroke,        METH_NOARGS },
-    { "stroke_preserve",(PyCFunction)pycairo_stroke,        METH_NOARGS },
-    { "text_extents",   (PyCFunction)pycairo_text_extents,  METH_VARARGS },
-    { "text_path",      (PyCFunction)pycairo_text_path,     METH_VARARGS },
-    { "transform",      (PyCFunction)pycairo_transform,     METH_VARARGS },
-    { "translate",      (PyCFunction)pycairo_translate,     METH_VARARGS },
-    { "user_to_device", (PyCFunction)pycairo_user_to_device,METH_VARARGS },
-    { "user_to_device_distance",(PyCFunction)pycairo_user_to_device_distance,
-      METH_VARARGS },
-    { NULL, NULL, 0 }
+    {"show_page",       (PyCFunction)pycairo_show_page,      METH_NOARGS},
+    {"show_text",       (PyCFunction)pycairo_show_text,      METH_VARARGS},
+    {"stroke",          (PyCFunction)pycairo_stroke,         METH_NOARGS},
+    {"stroke_preserve", (PyCFunction)pycairo_stroke,         METH_NOARGS},
+    {"text_extents",    (PyCFunction)pycairo_text_extents,   METH_VARARGS},
+    {"text_path",       (PyCFunction)pycairo_text_path,      METH_VARARGS},
+    {"transform",       (PyCFunction)pycairo_transform,      METH_VARARGS},
+    {"translate",       (PyCFunction)pycairo_translate,      METH_VARARGS},
+    {"user_to_device",  (PyCFunction)pycairo_user_to_device, METH_VARARGS},
+    {"user_to_device_distance",(PyCFunction)pycairo_user_to_device_distance,
+                                                             METH_VARARGS},
+    {NULL, NULL, 0, NULL},
 };
 
 static PyGetSetDef pycairo_getsets[] = {
-    { "fill_extents",   (getter)pycairo_fill_extents,     (setter)0 },
-    { "fill_rule",      (getter)pycairo_get_fill_rule,    (setter)0 },
-    { "font_face",      (getter)pycairo_get_font_face,    (setter)0 },
-    { "font_extents",   (getter)pycairo_font_extents,     (setter)0 },
-    { "font_matrix",    (getter)pycairo_get_font_matrix,  (setter)0 },
-    { "line_cap",       (getter)pycairo_get_line_cap,     (setter)0 },
-    { "line_join",      (getter)pycairo_get_line_join,    (setter)0 },
-    { "line_width",     (getter)pycairo_get_line_width,   (setter)0 },
-    { "matrix",         (getter)pycairo_get_matrix,       (setter)0 },
-    { "miter_limit",    (getter)pycairo_get_miter_limit,  (setter)0 },
-    { "operator",       (getter)pycairo_get_operator,     (setter)0 },
-    { "point",          (getter)pycairo_get_current_point,(setter)0 },
-    { "source",         (getter)pycairo_get_source,       (setter)0 },
-    { "stroke_extents", (getter)pycairo_stroke_extents,   (setter)0 },
-    { "target",         (getter)pycairo_get_target,       (setter)0 },
-    { "tolerance",      (getter)pycairo_get_tolerance,    (setter)0 },
-    { NULL, (getter)0, (setter)0 }
+    {"fill_extents",   (getter)pycairo_fill_extents},
+    {"font_extents",   (getter)pycairo_font_extents},
+    {"point",          (getter)pycairo_get_current_point},
+    {"stroke_extents", (getter)pycairo_stroke_extents},
+    {"target",         (getter)pycairo_get_target},
+    {NULL, (getter)0, (setter)0, NULL, NULL},
 };
 
 PyTypeObject PycairoContext_Type = {
@@ -1185,7 +1184,7 @@
     0,                                  /* tp_setattro */
     0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
-    NULL,                               /* tp_doc */
+    0,                                  /* tp_doc */
     0,                                  /* tp_traverse */
     0,                                  /* tp_clear */
     0,                                  /* tp_richcompare */

Index: pycairo-surface.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-surface.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- pycairo-surface.c	10 May 2005 00:55:39 -0000	1.36
+++ pycairo-surface.c	12 May 2005 00:00:08 -0000	1.37
@@ -168,20 +168,17 @@
      * cairo_surface_get_user_data()
      * cairo_surface_set_user_data()
      */
-    { "create_similar", (PyCFunction)surface_create_similar,    METH_VARARGS },
-    { "finish",         (PyCFunction)surface_finish,            METH_NOARGS },
-    { "set_device_offset",(PyCFunction)surface_set_device_offset, 
+    {"create_similar", (PyCFunction)surface_create_similar,    METH_VARARGS },
+    {"finish",         (PyCFunction)surface_finish,            METH_NOARGS },
+    {"set_device_offset",(PyCFunction)surface_set_device_offset, 
                                                                 METH_VARARGS },
 #ifdef CAIRO_HAS_PNG_FUNCTIONS
-    { "write_to_png",   (PyCFunction)surface_write_to_png,      METH_VARARGS },
+    {"write_to_png",   (PyCFunction)surface_write_to_png,      METH_VARARGS },
     /* write_to_png_stream */
 #endif
-    { NULL, NULL, 0 }
+    {NULL, NULL, 0, NULL},
 };
 
-static PyGetSetDef surface_getsets[] = {
-    { NULL, }
-};
 
 PyTypeObject PycairoSurface_Type = {
     PyObject_HEAD_INIT(&PyType_Type)
@@ -205,7 +202,7 @@
     0,                                  /* tp_setattro */
     0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT  | Py_TPFLAGS_BASETYPE, /* tp_flags */
-    NULL,                               /* tp_doc */
+    0,                                  /* tp_doc */
     0,                                  /* tp_traverse */
     0,                                  /* tp_clear */
     0,                                  /* tp_richcompare */
@@ -214,7 +211,7 @@
     0,                                  /* tp_iternext */
     surface_methods,                    /* tp_methods */
     0,                                  /* tp_members */
-    surface_getsets,                    /* tp_getset */
+    0,                                  /* tp_getset */
     &PyBaseObject_Type,                 /* tp_base */
     0,                                  /* tp_dict */
     0,                                  /* tp_descr_get */
@@ -425,25 +422,25 @@
 
 static PyMethodDef image_surface_methods[] = {
 #ifdef HAVE_NUMPY
-    { "create_for_array",(PyCFunction)image_surface_create_for_array, 
+    {"create_for_array",(PyCFunction)image_surface_create_for_array, 
                                                    METH_VARARGS | METH_CLASS },
 #endif
 #if 0
-    { "create_for_data",(PyCFunction)image_surface_create_for_data, 
+    {"create_for_data",(PyCFunction)image_surface_create_for_data, 
                                                    METH_VARARGS | METH_CLASS },
 #endif
 #ifdef CAIRO_HAS_PNG_FUNCTIONS
-    { "create_from_png", (PyCFunction)image_surface_create_from_png, 
+    {"create_from_png", (PyCFunction)image_surface_create_from_png, 
                                                    METH_VARARGS | METH_CLASS },
     /* create_from_png_stream */
 #endif
-    { NULL, NULL, 0 }
+    {NULL, NULL, 0, NULL},
 };
 
 static PyGetSetDef image_surface_getsets[] = {
-    { "height",   (getter)image_surface_get_height,     (setter)0 },
-    { "width",    (getter)image_surface_get_width,      (setter)0 },
-    { NULL, (getter)0, (setter)0 }
+    {"height", (getter)image_surface_get_height},
+    {"width",  (getter)image_surface_get_width},
+    {NULL, (getter)0, (setter)0, NULL, NULL},
 };
 
 PyTypeObject PycairoImageSurface_Type = {
@@ -468,7 +465,7 @@
     0,                                  /* tp_setattro */
     0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT,                 /* tp_flags */
-    NULL,                               /* tp_doc */
+    0,                                  /* tp_doc */
     0,                                  /* tp_traverse */
     0,                                  /* tp_clear */
     0,                                  /* tp_richcompare */
@@ -569,7 +566,7 @@
     0,                                  /* tp_setattro */
     0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT,                 /* tp_flags */
-    NULL,                               /* tp_doc */
+    0,                                  /* tp_doc */
     0,                                  /* tp_traverse */
     0,                                  /* tp_clear */
     0,                                  /* tp_richcompare */

Index: pycairo-pattern.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-pattern.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- pycairo-pattern.c	10 May 2005 00:55:39 -0000	1.19
+++ pycairo-pattern.c	12 May 2005 00:00:08 -0000	1.20
@@ -171,17 +171,23 @@
 }
 
 static PyObject *
-pattern_set_matrix(PycairoPattern *p, PyObject *args)
+pattern_get_extend(PycairoPattern *p)
 {
-    PycairoMatrix *matrix;
+    return PyInt_FromLong(cairo_pattern_get_extend(p->pattern));
+}
 
-    if (!PyArg_ParseTuple(args, "O!:Pattern.set_matrix",
-			  &PycairoMatrix_Type, &matrix))
-	return NULL;
+static PyObject *
+pattern_get_filter(PycairoPattern *p)
+{
+    return PyInt_FromLong(cairo_pattern_get_filter(p->pattern));
+}
 
-    /* always returns status = success */
-    cairo_pattern_set_matrix(p->pattern, &matrix->matrix);
-    Py_RETURN_NONE;
+static PyObject *
+pattern_get_matrix(PycairoPattern *p)
+{
+    cairo_matrix_t matrix;
+    cairo_pattern_get_matrix(p->pattern, &matrix);
+    return PycairoMatrix_FromMatrix(&matrix);
 }
 
 static PyObject *
@@ -209,55 +215,43 @@
     cairo_pattern_set_filter(p->pattern, filter);
     Py_RETURN_NONE;
 }
- 
+  
 static PyObject *
-pattern_get_matrix(PycairoPattern *p)
+pattern_set_matrix(PycairoPattern *p, PyObject *args)
 {
-    cairo_matrix_t matrix;
-
-    cairo_pattern_get_matrix(p->pattern, &matrix);
-    return PycairoMatrix_FromMatrix(&matrix);
-}
+    PycairoMatrix *matrix;
 
-static PyObject *
-pattern_get_extend(PycairoPattern *p)
-{
-    return PyInt_FromLong(cairo_pattern_get_extend(p->pattern));
-}
+    if (!PyArg_ParseTuple(args, "O!:Pattern.set_matrix",
+			  &PycairoMatrix_Type, &matrix))
+	return NULL;
 
-static PyObject *
-pattern_get_filter(PycairoPattern *p)
-{
-    return PyInt_FromLong(cairo_pattern_get_filter(p->pattern));
+    /* always returns status = success */
+    cairo_pattern_set_matrix(p->pattern, &matrix->matrix);
+    Py_RETURN_NONE;
 }
 
- 
 static PyMethodDef pattern_methods[] = {
     /* methods never exposed in a language binding:
      * cairo_pattern_destroy()
      * cairo_pattern_reference()
      */
-    { "add_color_stop_rgb",(PyCFunction)pattern_add_color_stop_rgb,  
-                                                                METH_VARARGS },
-    { "add_color_stop_rgba",(PyCFunction)pattern_add_color_stop_rgba,  
-                                                                METH_VARARGS },
-    { "create_for_surface",(PyCFunction)pattern_create_for_surface, 
-                                                   METH_VARARGS | METH_CLASS },
-    { "create_linear",    (PyCFunction)pattern_create_linear, 
-                                                   METH_VARARGS | METH_CLASS },
-    { "create_radial",    (PyCFunction)pattern_create_radial, 
-                                                   METH_VARARGS | METH_CLASS },
-    { "set_extend",       (PyCFunction)pattern_set_extend,      METH_VARARGS },
-    { "set_filter",       (PyCFunction)pattern_set_filter,      METH_VARARGS },
-    { "set_matrix",       (PyCFunction)pattern_set_matrix,      METH_VARARGS },
-    { NULL, NULL, 0 }
-};
-
-static PyGetSetDef pattern_getsets[] = {
-    { "extend", (getter)pattern_get_extend, (setter)0 },
-    { "filter", (getter)pattern_get_filter, (setter)0 },
-    { "matrix", (getter)pattern_get_matrix, (setter)0 },
-    { NULL, (getter)0, (setter)0 }
+    {"add_color_stop_rgb",(PyCFunction)pattern_add_color_stop_rgb,  
+                                                               METH_VARARGS },
+    {"add_color_stop_rgba",(PyCFunction)pattern_add_color_stop_rgba,  
+                                                               METH_VARARGS },
+    {"create_for_surface",(PyCFunction)pattern_create_for_surface, 
+                                                  METH_VARARGS | METH_CLASS },
+    {"create_linear",    (PyCFunction)pattern_create_linear, 
+                                                  METH_VARARGS | METH_CLASS },
+    {"create_radial",    (PyCFunction)pattern_create_radial, 
+                                                  METH_VARARGS | METH_CLASS },
+    {"get_extend",       (PyCFunction)pattern_get_extend,      METH_NOARGS },
+    {"get_filter",       (PyCFunction)pattern_get_filter,      METH_NOARGS },
+    {"get_matrix",       (PyCFunction)pattern_get_matrix,      METH_NOARGS },
+    {"set_extend",       (PyCFunction)pattern_set_extend,      METH_VARARGS },
+    {"set_filter",       (PyCFunction)pattern_set_filter,      METH_VARARGS },
+    {"set_matrix",       (PyCFunction)pattern_set_matrix,      METH_VARARGS },
+    {NULL, NULL, 0, NULL},
 };
 
 PyTypeObject PycairoPattern_Type = {
@@ -282,7 +276,7 @@
     0,                                  /* tp_setattro */
     0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT,                 /* tp_flags */
-    "Pattern objects",                  /* tp_doc */
+    0,                                  /* tp_doc */
     0,                                  /* tp_traverse */
     0,                                  /* tp_clear */
     0,                                  /* tp_richcompare */
@@ -291,7 +285,7 @@
     0,                                  /* tp_iternext */
     pattern_methods,                    /* tp_methods */
     0,                                  /* tp_members */
-    pattern_getsets,                    /* tp_getset */
+    0,                                  /* tp_getset */
     &PyBaseObject_Type,                 /* tp_base */
     0,                                  /* tp_dict */
     0,                                  /* tp_descr_get */

Index: pycairo-matrix.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-matrix.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- pycairo-matrix.c	10 May 2005 15:34:03 -0000	1.16
+++ pycairo-matrix.c	12 May 2005 00:00:08 -0000	1.17
@@ -287,27 +287,27 @@
      * cairo_matrix_init_scale()       cairo.Matrix(xx=xx,yy=yy)
      * cairo_matrix_init_rotate()      cairo.Matrix.init_rotate(radians)
      */
-    { "init_rotate", (PyCFunction)matrix_init_rotate,           
+    {"init_rotate", (PyCFunction)matrix_init_rotate,           
                                                    METH_VARARGS | METH_CLASS },
-    { "invert",      (PyCFunction)matrix_invert,                METH_NOARGS },
-    { "rotate",      (PyCFunction)matrix_rotate,                METH_VARARGS },
-    { "scale",       (PyCFunction)matrix_scale,                 METH_VARARGS },
-    { "transform_distance",(PyCFunction)matrix_transform_distance,
-                                                                METH_VARARGS },
-    { "transform_point", (PyCFunction)matrix_transform_point,   METH_VARARGS },
-    { "translate",   (PyCFunction)matrix_translate,             METH_VARARGS },
-    { NULL, NULL, 0 }
+    {"invert",      (PyCFunction)matrix_invert,                METH_NOARGS },
+    {"rotate",      (PyCFunction)matrix_rotate,                METH_VARARGS },
+    {"scale",       (PyCFunction)matrix_scale,                 METH_VARARGS },
+    {"transform_distance",(PyCFunction)matrix_transform_distance,
+                                                               METH_VARARGS },
+    {"transform_point", (PyCFunction)matrix_transform_point,   METH_VARARGS },
+    {"translate",   (PyCFunction)matrix_translate,             METH_VARARGS },
+    {NULL, NULL, 0, NULL},
 };
 
 static PyGetSetDef matrix_getsets[] = {
-    { "xx",   (getter)matrix_get_xx,     (setter)0 },
-    { "yx",   (getter)matrix_get_yx,     (setter)0 },
-    { "xy",   (getter)matrix_get_xy,     (setter)0 },
-    { "yy",   (getter)matrix_get_yy,     (setter)0 },
-    { "x0",   (getter)matrix_get_x0,     (setter)0 },
-    { "y0",   (getter)matrix_get_y0,     (setter)0 },
-    { "value",(getter)matrix_get_value,  (setter)0 },
-    { NULL, (getter)0, (setter)0 }
+    {"xx",   (getter)matrix_get_xx},
+    {"yx",   (getter)matrix_get_yx},
+    {"xy",   (getter)matrix_get_xy},
+    {"yy",   (getter)matrix_get_yy},
+    {"x0",   (getter)matrix_get_x0},
+    {"y0",   (getter)matrix_get_y0},
+    {"value",(getter)matrix_get_value},
+    {NULL, (getter)0, (setter)0, NULL, NULL},
 };
 
 PyTypeObject PycairoMatrix_Type = {

Index: pycairo-font.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-font.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- pycairo-font.c	10 May 2005 15:34:03 -0000	1.15
+++ pycairo-font.c	12 May 2005 00:00:08 -0000	1.16
@@ -73,20 +73,17 @@
     return type->tp_alloc(type, 0);
 }
 
+/*
 static PyMethodDef font_face_methods[] = {
-    /* methods never exposed in a language binding:
+     * methods never exposed in a language binding:
      * cairo_font_face_destroy()  
      * cairo_font_face_reference()
      * cairo_font_face_get_user_data()
      * cairo_font_face_set_user_data(),
-     */
-    { NULL, NULL, 0 }
-};
-
-static PyGetSetDef font_face_getsets[] = {
-    { NULL, (getter)0, (setter)0 }
+     *
+    {NULL, NULL, 0, NULL},
 };
-
+*/
 
 PyTypeObject PycairoFontFace_Type = {
     PyObject_HEAD_INIT(&PyType_Type)
@@ -110,16 +107,16 @@
     0,                                  /* tp_setattro */
     0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT,                 /* tp_flags */
-    NULL,                               /* tp_doc */
+    0,                                  /* tp_doc */
     0,                                  /* tp_traverse */
     0,                                  /* tp_clear */
     0,                                  /* tp_richcompare */
     0,                                  /* tp_weaklistoffset */
     0,                                  /* tp_iter */
     0,                                  /* tp_iternext */
-    font_face_methods,                  /* tp_methods */
+    0,                                  /* tp_methods */
     0,                                  /* tp_members */
-    font_face_getsets,                  /* tp_getset */
+    0,                                  /* tp_getset */
     &PyBaseObject_Type,                 /* tp_base */
     0,                                  /* tp_dict */
     0,                                  /* tp_descr_get */
@@ -213,12 +210,12 @@
      * cairo_scaled_font_reference()
      */
     /* glyph_extents - undocumented */
-    { NULL, NULL, 0 }
+    {NULL, NULL, 0, NULL},
 };
 
 static PyGetSetDef scaled_font_getsets[] = {
-    { "extents",   (getter)scaled_font_extents,     (setter)0 },
-    { NULL, (getter)0, (setter)0 }
+    {"extents", (getter)scaled_font_extents},
+    {NULL, (getter)0, (setter)0, NULL, NULL},
 };
 
 
@@ -244,7 +241,7 @@
     0,                                  /* tp_setattro */
     0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT,                 /* tp_flags */
-    NULL,                               /* tp_doc */
+    0,                                  /* tp_doc */
     0,                                  /* tp_traverse */
     0,                                  /* tp_clear */
     0,                                  /* tp_richcompare */




More information about the cairo-commit mailing list