patch for postgresql driver

Wols Lists antlists at youngman.org.uk
Wed Apr 17 00:28:21 PDT 2013


On 17/04/13 02:10, Lionel Elie Mamane wrote:
> On Tue, Apr 16, 2013 at 09:24:03PM +0100, Wols Lists wrote:
>> On 16/04/13 20:28, Lionel Elie Mamane wrote:
>>> On Tue, Apr 16, 2013 at 03:16:25PM +0100, Wols Lists wrote:
> 
>>>> I can't get my argument casting right - in the original
>>>> code, matchIgnoreAsciiCaseAsciiL wraps its argument in
>>>> RTL_CONSTASCII_STRINGPARAM.
> 
>>> RTL_CONSTASCII_STRINGPARAM is a hack/optimisation specific to
>>> compile-time constants. With your change, the string is not anymore
>>> a compile-time constant, so just use
> 
>>>  equalsIgnoreAsciiCaseAscii()
> 
>> I'm puzzled that it's not a compile-time constant
> 
> Well, it is not even a run-time constant: at each iteration of the
> loop, it is a different value.

Yes, the value passed changes each time, but the array itself is a
constant array of constant strings ...

Probably something to do with how the compiler manages "an array of
pointers to strings" - I know that's a weirdo in C, so probably also in C++.
> 
>> As soon as LO has built successfully, I'll sort out the patch and ask
>> someone to test it :-)
> 
> The PostgreSQL driver is (particularly) my area, so keep me in CC.
> 
> If you are interested in working on the Postgres driver, have a look
> at https://bugs.freedesktop.org/show_bug.cgi?id=43369
> 
> There are also a few bugs I didn't have time to look at.
> 
I'll tackle stuff as I see it - I remember being told to look at the
postgres driver to help me with the mariadb driver and this has been a
good learning experience. I couldn't see the wood for the trees, so I
thought I'd attack that todo, and hey presto things got a *bit* clearer.

Now to tidy up that patch and post a working example...

Cheers,
Wol


More information about the LibreOffice mailing list