Thread: JUMBLE_SIZE macro in two files

JUMBLE_SIZE macro in two files

From
bt22nakamorit
Date:
Hi,

queryjumble.c and queryjumble.h both define a macro JUMBLE_SIZE = 1024.
Since queryjumble.c includes queryjumble.h, the JUMBLE_SIZE definition 
in queryjumble.c should be deleted.
Thoughts?

Tatsu
Attachment

Re: JUMBLE_SIZE macro in two files

From
Julien Rouhaud
Date:
Hi,

On Tue, Oct 04, 2022 at 05:41:12PM +0900, bt22nakamorit wrote:
>
> queryjumble.c and queryjumble.h both define a macro JUMBLE_SIZE = 1024.
> Since queryjumble.c includes queryjumble.h, the JUMBLE_SIZE definition in
> queryjumble.c should be deleted.

+1



Re: JUMBLE_SIZE macro in two files

From
Tom Lane
Date:
bt22nakamorit <bt22nakamorit@oss.nttdata.com> writes:
> queryjumble.c and queryjumble.h both define a macro JUMBLE_SIZE = 1024.
> Since queryjumble.c includes queryjumble.h, the JUMBLE_SIZE definition 
> in queryjumble.c should be deleted.

I would go more for taking it out of queryjumble.h.  I see no
reason why that constant needs to be world-visible.

            regards, tom lane



Re: JUMBLE_SIZE macro in two files

From
Michael Paquier
Date:
On Tue, Oct 04, 2022 at 09:16:44AM -0400, Tom Lane wrote:
> I would go more for taking it out of queryjumble.h.  I see no
> reason why that constant needs to be world-visible.

I was just looking at the patch before seeing your reply, and thought
the exact same thing.  Perhaps you'd prefer apply that yourself?
--
Michael

Attachment

Re: JUMBLE_SIZE macro in two files

From
Tom Lane
Date:
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Oct 04, 2022 at 09:16:44AM -0400, Tom Lane wrote:
>> I would go more for taking it out of queryjumble.h.  I see no
>> reason why that constant needs to be world-visible.

> I was just looking at the patch before seeing your reply, and thought
> the exact same thing.  Perhaps you'd prefer apply that yourself?

Nah, feel free.

            regards, tom lane



Re: JUMBLE_SIZE macro in two files

From
Michael Paquier
Date:
On Tue, Oct 04, 2022 at 11:17:09PM -0400, Tom Lane wrote:
> Nah, feel free.

Okay, thanks.  Applied, then.
--
Michael

Attachment