[cairo-commit] pycairo/cairo pycairo-context.c,1.81,1.82
Steve Chaplin
commit at pdx.freedesktop.org
Thu Jan 18 15:21:28 PST 2007
Committed by: stevech1097
Update of /cvs/cairo/pycairo/cairo
In directory kemper:/tmp/cvs-serv8461/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.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- pycairo-context.c 16 Jan 2007 14:59:34 -0000 1.81
+++ pycairo-context.c 18 Jan 2007 23:21:23 -0000 1.82
@@ -346,13 +346,11 @@
pycairo_get_dash (PycairoContext *o)
{
double *dashes = NULL, offset;
- int count, i;
+ int count = 0, i;
PyObject *py_dashes = NULL, *rv = NULL;
cairo_status_t status;
- status = cairo_get_dash_count (o->ctx, &count);
- RETURN_NULL_IF_CAIRO_ERROR(status);
-
+ cairo_get_dash_count (o->ctx, &count);
dashes = PyMem_Malloc (count * sizeof(double));
if (dashes == NULL)
return PyErr_NoMemory();
@@ -384,9 +382,7 @@
static PyObject *
pycairo_get_dash_count (PycairoContext *o)
{
- int count;
- /* could add check for cairo_status */
- /*cairo_status_t status = cairo_get_dash_count (o->ctx, &count);*/
+ int count = 0;
cairo_get_dash_count (o->ctx, &count);
return PyInt_FromLong (count);
}
@@ -416,7 +412,6 @@
pycairo_get_font_options (PycairoContext *o)
{
cairo_font_options_t *options = cairo_font_options_create();
-
cairo_get_font_options (o->ctx, options);
/* there is no reference fn */
return PycairoFontOptions_FromFontOptions (options);
More information about the cairo-commit
mailing list