diff options
Diffstat (limited to 'graphics/py-cairo/patches/patch-ac')
-rw-r--r-- | graphics/py-cairo/patches/patch-ac | 67 |
1 files changed, 38 insertions, 29 deletions
diff --git a/graphics/py-cairo/patches/patch-ac b/graphics/py-cairo/patches/patch-ac index 16bd9cc821c..cddc20e3d9a 100644 --- a/graphics/py-cairo/patches/patch-ac +++ b/graphics/py-cairo/patches/patch-ac @@ -1,37 +1,46 @@ -$NetBSD: patch-ac,v 1.2 2009/05/13 12:56:47 obache Exp $ +$NetBSD: patch-ac,v 1.3 2009/08/31 08:04:32 wiz Exp $ ---- cairo/pycairo-surface.c.orig 2009-03-03 11:11:20.000000000 +0000 -+++ cairo/pycairo-surface.c -@@ -123,7 +123,7 @@ _write_func (void *closure, const unsign - { - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *res = PyObject_CallMethod ((PyObject *)closure, "write", "(s#)", -- data, (Py_ssize_t)length); -+ data, length); - if (res == NULL) { - /* an exception has occurred, it will be picked up later by - * Pycairo_Check_Status() -@@ -424,7 +424,7 @@ image_surface_create_for_data (PyTypeObj - cairo_format_t format; - unsigned char *buffer; - int width, height, stride = -1, res; -- Py_ssize_t buffer_len; -+ int buffer_len; - PyObject *obj; +--- src/surface.c.orig 2009-08-26 10:59:35.000000000 +0000 ++++ src/surface.c +@@ -118,7 +118,7 @@ static cairo_status_t + _write_func (void *closure, const unsigned char *data, unsigned int length) { + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *res = PyObject_CallMethod ((PyObject *)closure, "write", "(s#)", +- data, (Py_ssize_t)length); ++ data, length); + if (res == NULL) { + /* an exception has occurred, it will be picked up later by + * Pycairo_Check_Status() +@@ -401,7 +401,7 @@ image_surface_create_for_data (PyTypeObj + cairo_format_t format; + unsigned char *buffer; + int width, height, stride = -1, res; +- Py_ssize_t buffer_len; ++ int buffer_len; + PyObject *obj; - if (!PyArg_ParseTuple(args, "Oiii|i:Surface.create_for_data", -@@ -616,10 +616,10 @@ image_surface_buffer_getsegcount (Pycair + if (!PyArg_ParseTuple(args, "Oiii|i:Surface.create_for_data", +@@ -445,7 +445,7 @@ image_surface_create_for_data (PyTypeObj + static cairo_status_t + _read_func (void *closure, unsigned char *data, unsigned int length) { + char *buffer; +- Py_ssize_t str_length; ++ int str_length; + cairo_status_t status = CAIRO_STATUS_READ_ERROR; + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *pystr = PyObject_CallMethod ((PyObject *)closure, "read", "(i)", +@@ -585,10 +585,10 @@ image_surface_buffer_getsegcount (Pycair /* See Python C API Manual 10.7 */ static PyBufferProcs image_surface_as_buffer = { -- (readbufferproc) image_surface_buffer_getreadbuf, -- (writebufferproc)image_surface_buffer_getwritebuf, -- (segcountproc) image_surface_buffer_getsegcount, -- (charbufferproc) NULL, -+ (getreadbufferproc) image_surface_buffer_getreadbuf, -+ (getwritebufferproc)image_surface_buffer_getwritebuf, -+ (getsegcountproc) image_surface_buffer_getsegcount, -+ (getcharbufferproc) NULL, +- (readbufferproc) image_surface_buffer_getreadbuf, +- (writebufferproc)image_surface_buffer_getwritebuf, +- (segcountproc) image_surface_buffer_getsegcount, +- (charbufferproc) NULL, ++ (getreadbufferproc) image_surface_buffer_getreadbuf, ++ (getwritebufferproc)image_surface_buffer_getwritebuf, ++ (getsegcountproc) image_surface_buffer_getsegcount, ++ (getcharbufferproc) NULL, }; static PyMethodDef image_surface_methods[] = { |