[cairo-commit] pycairo/cairo pycairo-context.c,1.82,1.83

Steve Chaplin commit at pdx.freedesktop.org
Sun Jan 21 05:49:35 PST 2007


Committed by: stevech1097

Update of /cvs/cairo/pycairo/cairo
In directory kemper:/tmp/cvs-serv23367/cairo

Modified Files:
	pycairo-context.c 
Log Message:
'SC'

Index: pycairo-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-context.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- pycairo-context.c	18 Jan 2007 23:21:23 -0000	1.82
+++ pycairo-context.c	21 Jan 2007 13:49:31 -0000	1.83
@@ -202,12 +202,12 @@
  * typical rectangle_list a simple Python tuple in fine?
  */
 static PyObject *
-pycairo_copy_clip_rectangles (PycairoContext *o)
+pycairo_copy_clip_rectangle_list (PycairoContext *o)
 {
     int i;
     PyObject *rv = NULL;
     cairo_rectangle_t *r;
-    cairo_rectangle_list_t *rlist = cairo_copy_clip_rectangles (o->ctx);
+    cairo_rectangle_list_t *rlist = cairo_copy_clip_rectangle_list (o->ctx);
     if (rlist->status != CAIRO_STATUS_SUCCESS) {
 	Pycairo_Check_Status (rlist->status);
 	goto exit;
@@ -346,21 +346,15 @@
 pycairo_get_dash (PycairoContext *o)
 {
     double *dashes = NULL, offset;
-    int count = 0, i;
+    int count, i;
     PyObject *py_dashes = NULL, *rv = NULL;
-    cairo_status_t status;
 
-    cairo_get_dash_count (o->ctx, &count);
+    count = cairo_get_dash_count (o->ctx);
     dashes = PyMem_Malloc (count * sizeof(double));
     if (dashes == NULL)
 	return PyErr_NoMemory();
 
-    status = cairo_get_dash (o->ctx, dashes, &offset);
-    if (status != CAIRO_STATUS_SUCCESS) {
-	Pycairo_Check_Status (status);
-	goto exit;
-    }
-
+    cairo_get_dash (o->ctx, dashes, &offset);
     py_dashes = PyTuple_New(count);
     if (py_dashes == NULL)
 	goto exit;
@@ -382,9 +376,7 @@
 static PyObject *
 pycairo_get_dash_count (PycairoContext *o)
 {
-    int count = 0;
-    cairo_get_dash_count (o->ctx, &count);
-    return PyInt_FromLong (count);
+    return PyInt_FromLong (cairo_get_dash_count (o->ctx));
 }
 
 static PyObject *
@@ -1314,7 +1306,7 @@
     {"clip_extents",    (PyCFunction)pycairo_clip_extents,    METH_NOARGS},
     {"clip_preserve",   (PyCFunction)pycairo_clip_preserve,   METH_NOARGS},
     {"close_path",      (PyCFunction)pycairo_close_path,      METH_NOARGS},
-    {"copy_clip_rectangles", (PyCFunction)pycairo_copy_clip_rectangles,
+    {"copy_clip_rectangle_list", (PyCFunction)pycairo_copy_clip_rectangle_list,
                                                               METH_NOARGS},
     {"copy_page",       (PyCFunction)pycairo_copy_page,       METH_NOARGS},
     {"copy_path",       (PyCFunction)pycairo_copy_path,       METH_NOARGS},



More information about the cairo-commit mailing list