[cairo-commit] pycairo/cairo cairogtkmodule.c, 1.5, 1.6 cairomodule.c, 1.9, 1.10 caironumpymodule.c, 1.3, 1.4 pycairo-font.c, 1.3, 1.4 pycairo-context.c, 1.14, 1.15 pycairo.h, 1.8, 1.9 pycairo-matrix.c, 1.4, 1.5 pycairo-pattern.c, 1.7, 1.8 pycairo-private.h, 1.7, 1.8 pycairo-surface.c, 1.7, 1.8

Steve Chaplin commit at pdx.freedesktop.org
Fri Dec 10 05:03:37 PST 2004


Committed by: stevech1097

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

Modified Files:
	cairogtkmodule.c cairomodule.c caironumpymodule.c 
	pycairo-font.c pycairo-context.c pycairo.h pycairo-matrix.c 
	pycairo-pattern.c pycairo-private.h pycairo-surface.c 
Log Message:
SC 10/12/2004

Index: cairogtkmodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/cairogtkmodule.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cairogtkmodule.c	1 Dec 2004 09:29:13 -0000	1.5
+++ cairogtkmodule.c	10 Dec 2004 13:03:35 -0000	1.6
@@ -64,7 +64,7 @@
     if (!surface)
 	return PyErr_NoMemory();
 
-    return pycairo_surface_new(surface);
+    return pycairo_surface_wrap(surface);
 }
 
 static PyObject *
@@ -137,7 +137,7 @@
 	return PyErr_NoMemory();
     /* should get surface to hold reference to pixbuf ... */
 
-    return pycairo_surface_new(surface);
+    return pycairo_surface_wrap(surface);
 }
 
 static PyMethodDef cairogtk_functions[] = {

Index: cairomodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/cairomodule.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cairomodule.c	4 Dec 2004 09:20:51 -0000	1.9
+++ cairomodule.c	10 Dec 2004 13:03:35 -0000	1.10
@@ -118,7 +118,7 @@
 	return PyErr_NoMemory();
     /* should get surface to hold reference to buffer ... */
 
-    return pycairo_surface_new(surface);
+    return pycairo_surface_wrap(surface);
 }
 
 #ifdef CAIRO_HAS_PS_SURFACE
@@ -152,7 +152,7 @@
     if (!surface)
 	return PyErr_NoMemory();
 
-    return pycairo_surface_new(surface);
+    return pycairo_surface_wrap(surface);
 }
 #endif /* CAIRO_HAS_PS_SURFACE */
 
@@ -182,7 +182,7 @@
     if (!surface)
 	return PyErr_NoMemory();
 
-    return pycairo_surface_new(surface);
+    return pycairo_surface_wrap(surface);
 }
 #endif /* CAIRO_HAS_PNG_SURFACE */
 
@@ -206,11 +206,11 @@
 static struct _PyCairo_FunctionStruct api = {
     pycairo_check_status,
     &PyCairoMatrix_Type,
-    pycairo_matrix_new,
+    pycairo_matrix_wrap,
     &PyCairoSurface_Type,
-    pycairo_surface_new,
+    pycairo_surface_wrap,
     &PyCairoFont_Type,
-    pycairo_font_new,
+    pycairo_font_wrap,
     &PyCairoContext_Type,
     pycairo_context_wrap,
     &PyCairoPattern_Type,

Index: caironumpymodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/caironumpymodule.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- caironumpymodule.c	1 Dec 2004 09:29:13 -0000	1.3
+++ caironumpymodule.c	10 Dec 2004 13:03:35 -0000	1.4
@@ -94,7 +94,7 @@
 	return PyErr_NoMemory();
     /* should get surface to hold reference to array ... */
 
-    return pycairo_surface_new(surface);
+    return pycairo_surface_wrap(surface);
 }
 
 static PyMethodDef caironumpy_functions[] = {

Index: pycairo-font.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-font.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pycairo-font.c	1 Dec 2004 14:44:51 -0000	1.3
+++ pycairo-font.c	10 Dec 2004 13:03:35 -0000	1.4
@@ -37,7 +37,7 @@
 #include "pycairo-private.h"
 
 PyObject *
-pycairo_font_new(cairo_font_t *font)
+pycairo_font_wrap(cairo_font_t *font)
 {
     PyCairoFont *self;
 
@@ -93,7 +93,7 @@
     if (!matrix)
 	return PyErr_NoMemory();
     cairo_font_current_transform(self->font, matrix);
-    return pycairo_matrix_new(matrix);
+    return pycairo_matrix_wrap(matrix);
 }
 
 static PyGetSetDef pycairo_font_getsets[] = {

Index: pycairo-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-context.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- pycairo-context.c	5 Dec 2004 15:43:25 -0000	1.14
+++ pycairo-context.c	10 Dec 2004 13:03:35 -0000	1.15
@@ -897,7 +897,7 @@
 	Py_RETURN_NONE;
 
     cairo_font_reference(font);
-    return pycairo_font_new(font);
+    return pycairo_font_wrap(font);
 }
 
 static PyObject *
@@ -975,7 +975,7 @@
     if (!matrix)
 	return PyErr_NoMemory();
     cairo_current_matrix(self->ctx, matrix);
-    return pycairo_matrix_new(matrix);
+    return pycairo_matrix_wrap(matrix);
 }
 
 static PyObject *
@@ -988,7 +988,7 @@
 	Py_RETURN_NONE;
 
     cairo_surface_reference(surface);
-    return pycairo_surface_new(surface);
+    return pycairo_surface_wrap(surface);
 }
 
 static PyObject *

Index: pycairo.h
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- pycairo.h	1 Dec 2004 09:29:13 -0000	1.8
+++ pycairo.h	10 Dec 2004 13:03:35 -0000	1.9
@@ -65,11 +65,11 @@
 struct _PyCairo_FunctionStruct {
     int (* check_status)(cairo_status_t status);
     PyTypeObject *matrix_type;
-    PyObject *(* matrix_new)(cairo_matrix_t *matrix);
+    PyObject *(* matrix_wrap)(cairo_matrix_t *matrix);
     PyTypeObject *surface_type;
-    PyObject *(* surface_new)(cairo_surface_t *surface);
+    PyObject *(* surface_wrap)(cairo_surface_t *surface);
     PyTypeObject *font_type;
-    PyObject *(* font_new)(cairo_font_t *font);
+    PyObject *(* font_wrap)(cairo_font_t *font);
     PyTypeObject *context_type;
     PyObject *(* context_wrap)(cairo_t *ctx);
     PyTypeObject *pattern_type;
@@ -86,11 +86,11 @@
 
 #define pycairo_check_status (_PyCairo_API->check_status)
 #define PyCairoMatrix_Type  *(_PyCairo_API->matrix_type)
-#define pycairo_matrix_new   (_PyCairo_API->matrix_new)
+#define pycairo_matrix_wrap  (_PyCairo_API->matrix_wrap)
 #define PyCairoSurface_Type *(_PyCairo_API->surface_type)
-#define pycairo_surface_new  (_PyCairo_API->surface_new)
+#define pycairo_surface_wrap (_PyCairo_API->surface_wrap)
 #define PyCairoFont_Type    *(_PyCairo_API->font_type)
-#define pycairo_font_new     (_PyCairo_API->font_new)
+#define pycairo_font_wrap    (_PyCairo_API->font_wrap)
 #define PyCairoContext_Type *(_PyCairo_API->context_type)
 #define pycairo_context_wrap (_PyCairo_API->context_wrap)
 #define PyCairoPattern_Type *(_PyCairo_API->pattern_type)

Index: pycairo-matrix.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-matrix.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pycairo-matrix.c	1 Dec 2004 14:44:51 -0000	1.4
+++ pycairo-matrix.c	10 Dec 2004 13:03:35 -0000	1.5
@@ -37,7 +37,7 @@
 #include "pycairo-private.h"
 
 PyObject *
-pycairo_matrix_new(cairo_matrix_t *matrix)
+pycairo_matrix_wrap(cairo_matrix_t *matrix)
 {
     PyCairoMatrix *self;
 
@@ -136,7 +136,7 @@
 	return PyErr_NoMemory();
 
     cairo_matrix_multiply(result, self->matrix, other->matrix);
-    return pycairo_matrix_new(result);
+    return pycairo_matrix_wrap(result);
 }
 
 static PyNumberMethods pycairo_matrix_as_number = {
@@ -180,7 +180,7 @@
 
     cairo_matrix_copy(other, self->matrix);
     cairo_matrix_translate(other, tx, ty);
-    return pycairo_matrix_new(other);
+    return pycairo_matrix_wrap(other);
 }
 
 static PyObject *
@@ -198,7 +198,7 @@
 
     cairo_matrix_copy(other, self->matrix);
     cairo_matrix_scale(other, sx, sy);
-    return pycairo_matrix_new(other);
+    return pycairo_matrix_wrap(other);
 }
 
 static PyObject *
@@ -216,7 +216,7 @@
 
     cairo_matrix_copy(other, self->matrix);
     cairo_matrix_rotate(other, radians);
-    return pycairo_matrix_new(other);
+    return pycairo_matrix_wrap(other);
 }
 
 static PyObject *
@@ -233,7 +233,7 @@
 	cairo_matrix_destroy(other);
 	return NULL;
     }
-    return pycairo_matrix_new(other);
+    return pycairo_matrix_wrap(other);
 }
 
 static PyObject *

Index: pycairo-pattern.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-pattern.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pycairo-pattern.c	6 Dec 2004 03:06:51 -0000	1.7
+++ pycairo-pattern.c	10 Dec 2004 13:03:35 -0000	1.8
@@ -188,7 +188,7 @@
 
     /* always returns status = success */
     cairo_pattern_get_matrix(self->pattern, matrix);
-    return pycairo_matrix_new(matrix);
+    return pycairo_matrix_wrap(matrix);
 }
 
 static PyObject *

Index: pycairo-private.h
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-private.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pycairo-private.h	1 Dec 2004 14:44:51 -0000	1.7
+++ pycairo-private.h	10 Dec 2004 13:03:35 -0000	1.8
@@ -51,11 +51,11 @@
 int       pycairo_check_status(cairo_status_t status);
 
 /* takes ownership of reference */
-PyObject *pycairo_matrix_new(cairo_matrix_t *matrix);
+PyObject *pycairo_matrix_wrap(cairo_matrix_t *matrix);
 PyObject *pycairo_context_wrap(cairo_t *ctx);
-PyObject *pycairo_surface_new(cairo_surface_t *surface);
+PyObject *pycairo_surface_wrap(cairo_surface_t *surface);
 PyObject *pycairo_pattern_wrap(cairo_pattern_t *pattern);
-PyObject *pycairo_font_new(cairo_font_t *font);
+PyObject *pycairo_font_wrap(cairo_font_t *font);
 
 #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 4
 #  define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None

Index: pycairo-surface.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-surface.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pycairo-surface.c	6 Dec 2004 03:06:51 -0000	1.7
+++ pycairo-surface.c	10 Dec 2004 13:03:35 -0000	1.8
@@ -38,7 +38,7 @@
 #include "pycairo-private.h"
 
 PyObject *
-pycairo_surface_new(cairo_surface_t *surface)
+pycairo_surface_wrap(cairo_surface_t *surface)
 {
     PyCairoSurface *self;
 
@@ -81,7 +81,7 @@
 					   width, height);
     if (!surface)
 	return PyErr_NoMemory();
-    return pycairo_surface_new(surface);
+    return pycairo_surface_wrap(surface);
 }
 
 static PyObject *
@@ -127,7 +127,7 @@
 	cairo_matrix_destroy(matrix);
 	return NULL;
     }
-    return pycairo_matrix_new(matrix);
+    return pycairo_matrix_wrap(matrix);
 }
 
 static PyObject *




More information about the cairo-commit mailing list