Skip to Content.
Sympa Menu

freetds - Re: Some API change

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark J. Lilback" <mark AT lilback.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Some API change
  • Date: Fri, 16 Aug 2002 13:40:16 -0400


At 12:23 PM -0500 8/16/2002, Steve Langasek wrote:
On Fri, Aug 16, 2002 at 09:11:00AM +0200, Frediano Ziglio wrote:
I'd like to change some API declaration

2- use correct pointer type in msg handlers
int (*msg_handler)(TDSCONTEXT*, TDSSOCKET*, TDSMSGINFO*);
instead of
int (*msg_handler)(void*, void*, void*);
This remove the need to cast at every message handling function
Note also that this function prototype had been changed from last
release

Normally, this is an advantage because it allows your callback function
to treat the arguments opaquely, so you don't have to include the
library's headers. Is this not useful here? (If you're doing lots of
casting in your message handlers, I suppose not.)

This is one that's long bothered me, too.

I generally prefer to have no compiler warnings when I build something, and this caused lots of warnings.

Why/when would it be a problem to include the library's headers?

--
__________________________________________________________________________
"They that can give up essential liberty
Mark J. Lilback to obtain a little temporary safety
<mark AT lilback.com> deserve neither liberty or safety."
http://www.lilback.com/ -- Benjamin Franklin




Archive powered by MHonArc 2.6.24.

Top of Page