logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: PATCH: Removing macros in xcl.h and adding casts to Xlib types: msg#00051

freedesktop.xcb

Subject: Re: PATCH: Removing macros in xcl.h and adding casts to Xlib types

On 7/17/05, Barton C Massey <bart-sKt6ljEC1JY3uPMLIKxrzw@xxxxxxxxxxxxxxxx>
wrote:
> If the cast macros in the source are confusing, I think
> there are two better options: (1) move the cast function
> generation into the XCB-XML,

Hiding the code away in an XML file somewhere is a worse idea in my
opinion. Plus, I don't think any of XCL is being generated with
XCB-XML at the momement, so adding this functionality into the build
system seems like it would be a lot more work then its worth.

> or (2) document the macros
> properly.

That wouldn't hurt. I didn't even notice them for a while. I just
harry C code and glanced right by 'em.

> The features of macro-based generation are (a)
> fixes to the generation code propagate to all the cast
> functions, and

There are only 14 macros. That isn't a big job if they all need to be
modified in some way.

> (b) for the reader who does understand, this
> makes it clear that the cast functions are all the same and
> neatly summarizes what they are and how they are named.

That was why I declared them at the top of the header but then defined
them below. They still line up, they are still grouped together in
the same way (i.e., those that cast XIDs and those that cast IDs), and
they still summarize the functionality really well.

> Definitely bug the list before you work on something like
> this;

It only took an hour or so, so I'm not worried about it. By "bug
list" do you mean send an e-mail describing the idea to the list first
and get some feedback before setting out on the work?

> we'd be happy to discuss it with you. Thanks much, in
> any case, for the thought and the submission!
>

Even if the patch isn't accepted, I want the functionality to cast
from XCB types to Xlib types. I really hope you'll reconsider
accepting this patch, but if not, I would like to add these other
casts somewhere in the XCL.

--

Regards,

Travis Spencer





Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo