[cairo] Problem with C++ and cairo_path_data_t

Carl Worth cworth at redhat.com
Fri Jun 10 23:47:26 PDT 2005

On Thu, 09 Jun 2005 10:52:02 -0400, Owen Taylor wrote:
> > You can't have embedded enumerations in C++; the enumerated values
> > aren't visible outside of the embedding.  See

Ah. *grumble*

> +typedef enum cairo_path_type_t {
> +} cairo_path_type_t;
> Hmm, isn't this name a bit weird? (It's not the type of the path).
> Maybe cairo_path_operation_t? That's long, but there should (almost)
> never be variables of the type, so it doesn't really matter.

I would really like this suggestion except that "operation" wouldn't
match the existing, public field "type" in cairo_path_data_t.

How about cairo_path_data_type_t ? That's descriptive and accurate, it
maintains consistency with the existing field name, and it just so
happens to be the exact same length as cairo_path_operation_t.

In fact, I like that enough that I just committed it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050610/3fc069ef/attachment.pgp

More information about the cairo mailing list