[cairo] [RFC] Color space API (partial proposal)

Bill Spitzak spitzak at gmail.com
Wed Feb 24 15:47:42 PST 2010

My impression was that this was not a "bare pointer" but in fact a 
string name that was expected to be printed unchanged into the pdf file. 
Therefore I think const char* is the correct type of argument.

Jon Cruz wrote:
> On Feb 23, 2010, at 11:37 AM, Bill Spitzak wrote:
>> If PDF is unable to accept a nul byte as part of a spot color name, I think a const char* is exactly the right api.
>> Yes "char*" == "byte array" according to the C spec. But as Zack says, this is not true in practice. In practice "char* + length parameter" == "byte array", while "char*" == "null terminated string".
> As I was trying to explain, my main concern was for a "bare pointer" by itself, instead of a value attached to some other structure. Not a typedef, but a color or paint or whichever the appropriate Cairo structure is.
> Oh, and in practice "char*" by itself is used as a byte array *VERY* very often. (compared to how often it should be used).

More information about the cairo mailing list