[gnutls-devel] GnuTLS | restrict allowlisting api to before priority string initialization (!1533)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Fri Aug 12 03:10:52 CEST 2022
Daiki Ueno commented on a discussion on lib/config_int.h: https://gitlab.com/gnutls/gnutls/-/merge_requests/1533#note_1059267067
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public License
> + * along with this program. If not, see <https://www.gnu.org/licenses/>
> + *
> + */
> +
> +/* Code split off from priority.c, `struct cfg` and some operations on it */
> +
> +#ifndef GNUTLS_LIB_CONFIG_INT_H
> +#define GNUTLS_LIB_CONFIG_INT_H
> +
> +/*
> + * struct cfg
> I'm not sure what you're proposing, renaming it to cfg.c and including it as cfg.c from priority.c?
I suggest simply linking (not including) the new cfg.c. That would require separation of specification and implementation, like:
```c
/* cfg.h */
struct cfg; /* declaration */
static void cfg_steal(struct cfg *dst, struct cfg *src);
...
```
```c
/* cfg.c */
struct cfg {
...
};
static void cfg_steal(struct cfg *dst, struct cfg *src) {
...
}
```
This loses `static inline` but I suppose it's not a big problem as it's not on the performance critical path.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1533#note_1059267067
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220812/8d0aa574/attachment-0001.html>
More information about the Gnutls-devel
mailing list