[SSSD] SSSD ticket #2214

Lukas Slebodnik lslebodn at redhat.com
Mon Apr 7 09:39:40 UTC 2014


On (07/04/14 10:23), Jakub Hrozek wrote:
>On Fri, Apr 04, 2014 at 06:30:40PM -0400, Pavel Reichl wrote:
>> Or you could write a wrapper function 'diff_string_lists_const' calling original 'diff_string_lists' but at least hiding the nasty discard_const_p.
>
>Do we have the discard_const hack used anywhere else than the AD
>provider enumeration? If not, then I would just close the ticket. If
>there are more occurences, the wrapper might help.
>
The idea with wrappers is not ideal, because C does not allow function
overloading. Thus we will need at least 3 versions of this function

1st:
errno_t diff_string_lists(TALLOC_CTX *memctx,
                          char **_list1,
                          char **_list2,
                          ...

2nd:
errno_t diff_string_lists_const(TALLOC_CTX *memctx,
                                const char **_list1,
                                char **_list2,
                                ...

3rd:
errno_t diff_string_lists_const_const(TALLOC_CTX *memctx,
                                      const char **_list1,
                                      const char **_list2,
                                      ...
LS



More information about the sssd-devel mailing list