Skip to Content.
Sympa Menu

freetds - RE: [freetds] TDSICONVINFO **iconv_info

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] TDSICONVINFO **iconv_info
  • Date: Tue, 21 Oct 2003 10:05:31 +0200

>
> On Mon, 20 Oct 2003, "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
> wrote:
> > > >
> > > > Freddy, I don't understand this change:
> > > >
> > > > - TDSICONVINFO *iconv_info;
> > > > + TDSICONVINFO **iconv_info;
> ...
> > This solution seem quite easier for me... I know we allocate many
> > dinamic buffers but I didn't find another better solution.
>
> Freddy,
>
> Solution to what? I would rather we not do this, because
> it's more complex and we're not solving a real, concrete
> problem, just something we think might come up. Better to
> see if it does, first, and see what to do then.
>

We never used TDSCOLINFO->iconv_info so the problem to keep addresses
constant didn't exists. The patch use TDSCOLINFO->iconv_info so the
problem raise and I had to code a solution. As you said allocating an
iconv structure for every column is not good so I allocate all iconv
stuff in TDSSOCKET->iconv_info keeping TDSICONVINFO structure fixed in
memory. I need to fix TDSICONVINFO* so using TDSICONVINFO* I can
reallocate TDSICONVINFO** and keep TDSICONVINFO* constants.

> But. You're a developer and you wrote the code. I assume it
> works. The only reason it's not committed is technical: if
> your connection were working properly, this would already be
> in CVS. I won't use the fact that I happen to be the
> gatekeeper at the moment to stand in your way.
>

The code works. I had some issues related to UTF8 but I discovered that
the problem is not related to my patch so I said to commit to you.

> I've stated my objection. No one else voiced any. If you
> still want the patch committed as-is, I'll do it tomorrow,
> unless someone beats me to it.
>
>
> Regards,
>

To be honest I don't like double indirection too... usually it cause
some unwanted bugs due to complexity... If you have another allocation
strategi I'll be glad to code it. I though about linked list however I'd
lose direct access and allocation are much more... I used chunked
allocations (allocating more structures at a time) but it's not so easy
to maintain... I don't want to allocate them on global for thread
problems...

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page