The format specifier inside _wrap_gdk_bitmap_create_from_data in gtk/gdk.c
needs to be s# instead of s (bitmap data can contain null characters).
Presumably this bug affects any XXXXX_from_data functions.
How do I adjust the .defs file to do this? ie. the function needs to be
(I hope my mailer doesn't mangle this too badly):
static PyObject *
_wrap_gdk_bitmap_create_from_data(PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "window", "data", "width", "height", NULL };
PyGObject *window;
char *data;
int datalen;
int width, height;
GdkBitmap *ret;
/* fixed specifier VV */
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!s#ii:bitmap_create_from_data",
kwlist, &PyGdkWindow_Type, &window, &data, &datalen, &width, &height))
return NULL;
ret = gdk_bitmap_create_from_data(GDK_WINDOW(window->obj), data, width, height);
/* pygobject_new handles NULL checking */
return pygobject_new((GObject *)ret);
}
Thanks,
-a
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/