freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: TDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] _DB_GETCOLINFO whacked
- Date: Sun, 2 Dec 2007 13:23:21 -0500
I removed the _DB_GETCOLINFO macro, replacing it with a function
dbcolptr(). The macro had gotten too complicated and wasn't all that well
conceived to begin with.
In general I think it's a bad idea for macros to have side effects. This
one required two variables to be declared, so it could assign them, and
contained return statements in case its checks turned up an error. I
didn't think "get column info" suggested "exit if you can't".
The new function calls dbperror() for you and returns the error code, so
the caller can decide what to do next. It takes the address of a
TDSCOLUMN pointer, which is sets. I think it makes what's going on a
little clearer.
--jkl
-
[freetds] _DB_GETCOLINFO whacked,
James K. Lowden, 12/02/2007
-
Re: [freetds] _DB_GETCOLINFO whacked,
ZIGLIO, Frediano, VF-IT, 12/03/2007
- Re: [freetds] _DB_GETCOLINFO whacked, James K. Lowden, 12/03/2007
-
Re: [freetds] _DB_GETCOLINFO whacked,
ZIGLIO, Frediano, VF-IT, 12/03/2007
Archive powered by MHonArc 2.6.24.