Bug 20075

Summary: There is a misprint in the spec for cairo_image_surface_create_from_png_stream() function
Product: cairo Reporter: Truc Truong <tructv>
Component: png functionsAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.8.6   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Truc Truong 2009-02-12 01:55:06 UTC
In the spec for cairo_image_surface_create_from_png_stream(), the standard states:

Returns : a new cairo_surface_t initialized with the contents of the PNG file or NULL if the data read is not a valid PNG image or memory could not be allocated for the operation.

As my understanding, in case of fail, this function should return "nil" surface instead of NULL. So i suppose this spec should be:

Returns : a new cairo_surface_t initialized with the contents of the PNG file or “nil” surface if the data read is not a valid PNG image or memory could not be allocated for the operation.

Thank you very much for your time and please let me know any ruling/finding that you may have.
Comment 1 Chris Wilson 2009-02-12 02:47:33 UTC
Thank you, I've updated the documentation to refer to the nil-surface.

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.