[pacman-dev] [PATCH] removed duplicate macros SYMEXPORT and SYMHIDDEN from alpm_list.c, using them from util.h

Dan McGee dpmcgee at gmail.com
Wed May 29 09:59:20 EDT 2013


On Tue, May 28, 2013 at 11:43 PM, Allan McRae <allan at archlinux.org> wrote:
> On 27/07/12 06:51, Dan McGee wrote:
>> On Thu, Jul 26, 2012 at 3:23 PM, Paul Barbu Gheorghe
>> <barbu.paul.gheorghe at gmail.com> wrote:
>>> Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe at gmail.com>
>>> ---
>>>  lib/libalpm/alpm_list.c | 6 ++----
>>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c
>>> index 39eded1..b9e7cba 100644
>>> --- a/lib/libalpm/alpm_list.c
>>> +++ b/lib/libalpm/alpm_list.c
>>> @@ -21,13 +21,11 @@
>>>  #include <stdlib.h>
>>>  #include <string.h>
>>>  +#include "util.h"
>>> +
>>>  /* libalpm */
>>>  #include "alpm_list.h"
>>>  -/* check exported library symbols with: nm -C -D <lib> */
>>> -#define SYMEXPORT __attribute__((visibility("default")))
>>> -#define SYMHIDDEN __attribute__((visibility("internal")))
>>> -
>>
>> The reasoning behind this is alpm_list.c/h is a completely standalone
>> set of files, so we don't link back to anything in the rest of alpm.
>> With that said, the duplicates were quite on purpose and I'm not
>> inclined to apply this patch.
>
>
> Cleaning out patch backlog...
>
> Our choices are:
> 1) accept patch
> 2) add comment in alpm_list.c that it is a stand alone file
>
> Personally, I doubt anyone is taking alpm_list.{h,c} and using it
> anywhere.  There are plenty of more widely used list implementations out
> there.   So I do not care which solution is used.
>
>
> @Dan:  I'm going to let you have final say here.  Just a yes/no needed.

I vote #2.

And then switch to glib [1]. :)

-Dan

[1] https://developer.gnome.org/glib/2.30/glib-Pointer-Arrays.html


More information about the pacman-dev mailing list