[cups.development] cups ppd_file_t binary compatibility

Michael Sweet mike at easysw.com
Wed Apr 25 18:35:41 PDT 2007


Hidetomo Katsura wrote:
> a quick question: how likely is it or at least are you aware of any cups
> clients on Mac OS X that depend on the size of ppd_file_t struct to be
> constant?

Not at all likely since all of the APIs allocate the structure for
the caller.

> i'm asking this because i need to add an extra field to ppd_file_t to hack
> the existing cups 1.1.23 on Mac OS X 10.4.
> 
> at least i now know Mac OS X itself depends on the size of ppd_option_t
> struct since it crashed after i added an extra field to it. no binary
> compatibility there... :(

Right, I unfortunately implemented it with an array of structures
instead of an array of pointers.  We're stuck with it, unfortunately,
until CUPS 2.0 (which is a very long way off...)

> also it would be nice if cups.org discourages developers to depend on the
> size of ppd_file_t (or any struct) so that we can extend cups functionality
> without worrying about breaking the binary compatibility. or has it already
> been discouraged?

Already discouraged in that the only way to initialize a ppd_file_t
structure is to call one of the ppdOpen functions which allocates
it...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups mailing list