[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gl_list API
From: |
Bruno Haible |
Subject: |
Re: gl_list API |
Date: |
Tue, 06 Apr 2021 23:04:20 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-206-generic; KDE/5.18.0; x86_64; ; ) |
> > But when designing a general utility, for all kinds of programs to use,
> > it is inappropriate to say "storing null elements is not useful".
>
> I'm afraid we'll have to disagree here.
In some of my uses of the gl_list module, the element is in fact a small
integer, cast to an 'uintptr_t' and then further cast to a 'const void *'.
If the API would forbid storing a NULL pointer, my specialized container
type would need a workaround for storing the integer value 0.
Bruno
- Type-safe typecasts, Marc Nieper-Wißkirchen, 2021/04/06
- Re: Type-safe typecasts, Paul Eggert, 2021/04/06
- Re: Type-safe typecasts, Marc Nieper-Wißkirchen, 2021/04/06
- Re: Type-safe typecasts, Paul Eggert, 2021/04/06
- Re: Type-safe typecasts, Marc Nieper-Wißkirchen, 2021/04/06
- Re: gl_list API, Bruno Haible, 2021/04/06
- Re: gl_list API, Paul Eggert, 2021/04/06
- Re: gl_list API,
Bruno Haible <=
- Re: gl_list API, Marc Nieper-Wißkirchen, 2021/04/06
- Re: cast macros, Bruno Haible, 2021/04/06
- Re: cast macros, Ben Pfaff, 2021/04/18
- Re: gl_list API, Ben Pfaff, 2021/04/18
- Re: Type-safe typecasts, Bruno Haible, 2021/04/06
Re: Type-safe typecasts, Ben Pfaff, 2021/04/06