Bug 28060 - documentation error for cairo_write_func_t description; missing "const"
Summary: documentation error for cairo_write_func_t description; missing "const"
Status: RESOLVED NOTOURBUG
Alias: None
Product: cairo
Classification: Unclassified
Component: png functions (show other bugs)
Version: 1.9.7
Hardware: Other All
: medium minor
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-11 02:16 UTC by Ben Bullock
Modified: 2016-07-05 23:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Ben Bullock 2010-05-11 02:16:22 UTC
As seen on the Cairo webpages,

http://cairographics.org/manual/cairo-png-functions.html

the type "cairo_write_func_t" is described as follows:

cairo_status_t      (*cairo_write_func_t)               (void *closure,
                                                         unsigned char *data,
                                                         unsigned int length);

However, using this for the callback caused a compiler warning. Looking at the header file, the second argument should be "const unsigned char * data".
Comment 1 Maarten Bosmans 2010-12-30 01:49:54 UTC
It's a bug in gtk-doc.
I've attached a patch at https://bugzilla.gnome.org/show_bug.cgi?id=638330

To resolve the cairo bug the docs on the website need to be generated using a patched gtk-doc. Should I generate the docs and attach them to this bugreport?
Comment 2 Bryce Harrington 2016-07-05 23:25:30 UTC
Looks like upstream accepted the error as theirs and fixed it in 2011.

The URL for the cairo documentation has changed, but looks like it's showing const now as expected.

https://www.cairographics.org/manual/cairo-PNG-Support.html#cairo-write-func-t


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.