freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Joseph W. Losco" <joe AT sqpuv.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] FreeTDS dbwillconvert discrepancy
- Date: Thu, 11 Dec 2008 03:52:02 -0500
On Nov 29, 2008, at 8:38 PM, James K. Lowden wrote:
Joe Losco wrote:
However, in the Objective C/GUI version it appears to return a Bool. It
seems to return 1 if it is convertable and 0 if it is not. This
obviously messes up the rest of the allocations in the sample resulting
in truncation and overflow errors.
My first instinct was to wonder if in fact you're linking to FreeTDS and
not one of the vendor libraries, or perhaps to a version prior to 0.82. I
assume none of those is the case.
My second guess is to wonder if Objective C is looking at the header file
(or something like that), interpreting each nonzero return code as "true",
and returning only 0 or 1. Is there glue code that allows Objective C to
call a C library? Is there some preprocessing that gets done to make C
functions available to it?
If so, the solution might be to define the function as returning DBINT
instead of DBBOOL. Or something like that.
I just reread this to check if I missed anything and indeed I did. If I would change the header file to be a DBINT instead of a DBBOOL, I would then have to change the .c file also and recompile correct? If so, then I'll have to do some tinkering to figure out how to compile the code as a OS X framework.
Joe
-
Re: [freetds] FreeTDS dbwillconvert discrepancy,
Joseph W. Losco, 12/11/2008
-
Re: [freetds] FreeTDS dbwillconvert discrepancy,
James K. Lowden, 12/11/2008
- Re: [freetds] FreeTDS dbwillconvert discrepancy, Joseph W. Losco, 12/12/2008
-
Re: [freetds] FreeTDS dbwillconvert discrepancy,
James K. Lowden, 12/11/2008
Archive powered by MHonArc 2.6.24.