
18 Oct
2006
18 Oct
'06
1:47 p.m.
Another question / observation on the GIL API. When interfacing with external code, particularly "C" libraries, it's often necessary to pass a pointer to the memory managed by an image (gdk_pixbuf_create_from_raw_data() in my case). So far, I've been using &image[0] to get a pointer to memory, but that's pretty ugly, and I'm thinking it might not work for all cases. Is there a better way to do it? If not, I'd suggest adding an "image::data()" method that would provide canonical access to memory. The choice of name is for consistency with std::basic_string::data(). Cheers, Tim