I don't want to use cupsAddOption()
, because it has quadratic behaviour (only ever adds one entry to the allocated memory block), and because it strdups every name and value string, while in my case, they are all string literals. So in a call to cupsPrintFile()
, I want to pass a C array of cups_option_t
s.
But as a C++ programmer, I cannot assign a C string literal (having type const char[]
) to the cups_option_t
fields, because they are char*
.
Is that just lazy API design, or does CUPS actually manipulate those strings in-place?