Thread: [PATCH] Style: fix function declaration
Hi, Fix function declaration . Best regards, Ranier Vilela --- \dll\postgresql\a\backend\utils\adt\mac8.c 2019-11-23 13:19:20.000000000 -0300 +++ mac8.c 2019-11-24 09:41:34.200458700 -0300 @@ -35,7 +35,7 @@ #define lobits(addr) \ ((unsigned long)(((addr)->e<<24) | ((addr)->f<<16) | ((addr)->g<<8) | ((addr)->h))) -static unsigned char hex2_to_uchar(const unsigned char *str, const unsigned char *ptr); +static unsigned char hex2_to_uchar(const unsigned char *ptr, const unsigned char *str); static const signed char hexlookup[128] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Attachment
Hi, On Sun, Nov 24, 2019 at 12:47:40PM +0000, Ranier Vilela wrote: > Fix function declaration . I see no problem with fixing this kind of inconsistency for readability, so applied the change. Anyway, when sending a patch there are a couple of things which can make the life of people looking at what you send easier: https://wiki.postgresql.org/wiki/Submitting_a_Patch One problem that I noted with the patch sent on this thread is that it does not directly apply on the git repository. Folks on -hackers are mainly used to diffs generated by git. So first I would recommend that you set up a git repository of the tree, say with that: git clone https://git.postgresql.org/git/postgresql.git And then you can begin working on the code. On Windows, using git is a rather straight-foward experience (I have used it and still use it occasionally because it has its own concept of *nix-like terminal): https://git-scm.com/download/win Most people use a *nix platform, with either macos, Linux, a BSD flavor (NetBSD, FreeBSD), etc. Still there are Windows users. Building the code can be harder than other platforms, but we have documentation on the matter: https://www.postgresql.org/docs/devel/install-windows.html Generating a patch can be done with git in a couple of ways from the cloned repository, say: 1) git diff 2) git format-patch Both can be applied with a simple "patch -p1" command or even the more advanced "git am", still the latter is kind of picky. The code of Postgres is complex, so usually there are reasons why things are done the way they are, and it is important to not be afraid to ask questions. Also, making the subject of the emails you send explicative enough is important. Please note pgsql-hackers has a lot of traffic, and this helps some people in filtering out threads they are not interested in. Thanks! -- Michael
Attachment
Hi,
>I see no problem with fixing this kind of inconsistency for
>readability, so applied the change.
Thank you.
>Anyway, when sending a patch there are a couple of things which can
>make the life of people looking at what you send easier:
>https://wiki.postgresql.org/wiki/Submitting_a_Patch
Yes, I will read.
>One problem that I noted with the patch sent on this thread is that it
>does not directly apply on the git repository. Folks on -hackers are
>mainly used to diffs generated by git. So first I would recommend
>that you set up a git repository of the tree, say with that:
>git clone https://git.postgresql.org/git/postgresql.git
I will make use.
>Generating a patch can be done with git in a couple of ways from the
>cloned repository, say:
>1) git diff
>2) git format-patch
>Both can be applied with a simple "patch -p1" command or even the more
>advanced "git am", still the latter is kind of picky.
Thanks for the hints.
>The code of Postgres is complex, so usually there are reasons why
>things are done the way they are, and it is important to not be afraid
>to ask questions. Also, making the subject of the emails you send
>explicative enough is important. Please note pgsql-hackers has a lot
>of traffic, and this helps some people in filtering out threads they
>are not interested in.
Well, my experience with pgsql-hackers, haven't been good.
Ask questions, about the code, have not had good acceptance..
Best regards.
Ranier Vilela
>readability, so applied the change.
Thank you.
>Anyway, when sending a patch there are a couple of things which can
>make the life of people looking at what you send easier:
>https://wiki.postgresql.org/wiki/Submitting_a_Patch
Yes, I will read.
>One problem that I noted with the patch sent on this thread is that it
>does not directly apply on the git repository. Folks on -hackers are
>mainly used to diffs generated by git. So first I would recommend
>that you set up a git repository of the tree, say with that:
>git clone https://git.postgresql.org/git/postgresql.git
I will make use.
>Generating a patch can be done with git in a couple of ways from the
>cloned repository, say:
>1) git diff
>2) git format-patch
>Both can be applied with a simple "patch -p1" command or even the more
>advanced "git am", still the latter is kind of picky.
Thanks for the hints.
>The code of Postgres is complex, so usually there are reasons why
>things are done the way they are, and it is important to not be afraid
>to ask questions. Also, making the subject of the emails you send
>explicative enough is important. Please note pgsql-hackers has a lot
>of traffic, and this helps some people in filtering out threads they
>are not interested in.
Well, my experience with pgsql-hackers, haven't been good.
Ask questions, about the code, have not had good acceptance..
Best regards.
Ranier Vilela