Skip to content

Commit

Permalink
Merge pull request #4 from mdboom/fix-gdk-strides
Browse files Browse the repository at this point in the history
Fix _backend_gdk.c
  • Loading branch information
jkseppan committed Oct 18, 2014
2 parents 8f4ba0d + 094666d commit 2636978
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/_backend_gdk.c
Expand Up @@ -43,14 +43,14 @@ pixbuf_get_pixels_array(PyObject *self, PyObject *args)
array = (PyArrayObject*)
PyArray_New(&PyArray_Type, 3, dims, NPY_UBYTE, strides,
(void*)gdk_pixbuf_get_pixels(gdk_pixbuf), 1,
0, NULL);
NPY_ARRAY_WRITEABLE, NULL);

if (array == NULL)
return NULL;

/* the array holds a ref to the pixbuf pixels through this wrapper*/
Py_INCREF(py_pixbuf);
array->base = (PyObject *)py_pixbuf;
PyArray_SetBaseObject(array, (PyObject *)py_pixbuf);
return PyArray_Return(array);
}

Expand Down

0 comments on commit 2636978

Please sign in to comment.