[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Identical function names in bash source code
From: |
don fong |
Subject: |
Re: Identical function names in bash source code |
Date: |
Sat, 5 Jan 2019 10:25:11 -0800 |
for my 2c, the post seems within the charter.
quoting from the bug-bash info
<https://lists.gnu.org/mailman/listinfo/bug-bash>page:
> This list distributes, to the active maintainers of BASH (the Bourne Again
> SHell), bug reports and fixes for, and *suggestions for improvements in
> BASH. *
On Sat, Jan 5, 2019 at 9:15 AM Eduardo A. Bustamante López <
dualbus@gmail.com> wrote:
> On Sat, Jan 05, 2019 at 08:19:38AM -0600, Peng Yu wrote:
> > Hi,
> >
> > It is not uncommon to see the same name is used to defined functions
> > in different .c files in bash source code.
> >
> > For example, sh_single_quote is defined in both lib/readline/shell.c
> > and lib/sh/shquote.c with the exact same signature. The two pieces of
> > code are slightly different. Do they do the exact same things or do
> > something different?
> >
> > In either case, is having the same name for different functions a good
> > practice? This will make the linked binary dependent on the order of
> > the corresponding .a files specified. Or if linked via .o files, then
> > one function will shadow the others. See 1) and 2) below for minimal
> > working examples. Neither cases seem to be good and could be avoided
> > easily by giving the functions unique names.
> >
> > So, should such functions with the same name be named differently?
> Thanks.
>
> This mailing list (bug-bash) is for reporting BUGS. If you must, at least
> please
> use help-bash for generic questions?
>
> Although you should probably be asking this to a C programming forum...
>
>
- Identical function names in bash source code, Peng Yu, 2019/01/05
- Re: Identical function names in bash source code, Eduardo A . Bustamante López, 2019/01/05
- Re: Identical function names in bash source code,
don fong <=
- Re: Identical function names in bash source code, Eduardo Bustamante, 2019/01/05
- Re: Identical function names in bash source code, Peng Yu, 2019/01/05
- Re: Identical function names in bash source code, Eduardo Bustamante, 2019/01/05
- Re: Identical function names in bash source code, Chet Ramey, 2019/01/06
- Re: Identical function names in bash source code, Chet Ramey, 2019/01/06
- Re: Identical function names in bash source code, Chet Ramey, 2019/01/06