[pacman-dev] PATCH 8/8] Replace hardcoded option numbers with enumeration

Laszlo Papp djszapi at archlinux.us
Sun Oct 11 21:42:06 EDT 2009


On Sun, Oct 11, 2009 at 10:09 PM, Xavier <shiningxc at gmail.com> wrote:

> On Sun, Oct 11, 2009 at 10:02 PM, Dan McGee <dpmcgee at gmail.com> wrote:
> > On Wed, Sep 30, 2009 at 9:49 PM, Laszlo Papp <djszapi at archlinux.us>
> wrote:
> >> Pacman's long option parsing used hardcoded numbers to identify them.
> >> This is not good practice, so replace them with enumeration constants.
> >>
> >> Signed-off-by: Laszlo Papp <djszapi at archlinux.us>
> >> ---
> >
> > I can't apply this (or your other patches), the lines are wrapped in
> > the patch. Please use git-send-email or some other method that doesn't
> > wrap the lines. Other than that, this patch looks good.
> >
> > For the general audience, is there any reason not just to make these
> > OP_* constants? PM_LONG_OP_ seems a bit excessive for something that
> > isn't in the API or anything.
> >
>
> OP_* sounds good to me.
>
>
If you see into the ./src/pacman/conf.h file, you will see the existing
operations enumeration start with PM_OP_*.
What could I take in this case, is PM_OP_* and that enumeration okay to
extend ?

Best Regards,
Laszlo Papp


More information about the pacman-dev mailing list