From: Simon Josefsson via Gnulib discussion list <bug-gnulib@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: bug-gnulib@gnu.org
Subject: Re: [PATCH] base32, base64: prefer signed to unsigned integers
Date: Sun, 29 Aug 2021 10:20:45 +0200 [thread overview]
Message-ID: <87tuj8pspu.fsf@latte.josefsson.org> (raw)
In-Reply-To: <20210827222756.530247-1-eggert@cs.ucla.edu> (Paul Eggert's message of "Fri, 27 Aug 2021 15:27:56 -0700")
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]
Paul Eggert <eggert@cs.ucla.edu> writes:
> -extern void base64_encode (const char *restrict in, size_t inlen,
> - char *restrict out, size_t outlen);
> +extern void base64_encode (const char *restrict in, idx_t inlen,
> + char *restrict out, idx_t outlen);
Thanks for improving the code -- however, the API is quite wide spread
already, and size_t (or unsigned int) is widely used for many other
base64 APIs so this change causes friction at the API level. What do
you think? I'm not sure I understand why idx_t is better than size_t
here, can you elaborate? Why not ssize_t? Maybe a compromise is to
keep the old API but add new APIs with idx_t types and the
implementation of the old functions uses the new one.
/Simon
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
next prev parent reply other threads:[~2021-08-29 8:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 22:27 [PATCH] base32, base64: prefer signed to unsigned integers Paul Eggert
2021-08-28 12:45 ` Bruno Haible
2021-08-28 14:12 ` Bruno Haible
2021-08-29 7:57 ` Paul Eggert
2021-08-29 10:16 ` Bruno Haible
2021-08-29 17:25 ` Paul Eggert
2021-08-29 18:36 ` Bruno Haible
2021-08-29 20:01 ` Paul Eggert
2021-08-29 7:49 ` Paul Eggert
2021-09-19 22:07 ` ialloc: relicense Bruno Haible
2021-08-29 8:20 ` Simon Josefsson via Gnulib discussion list [this message]
2021-08-29 9:56 ` [PATCH] base32, base64: prefer signed to unsigned integers Bruno Haible
2021-08-30 14:12 ` Simon Josefsson via Gnulib discussion list
2021-08-30 18:17 ` Paul Eggert
2021-08-30 18:58 ` Simon Josefsson via Gnulib discussion list
2021-09-04 10:06 ` autoupdate again Bruno Haible
2021-09-04 16:47 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tuj8pspu.fsf@latte.josefsson.org \
--to=bug-gnulib@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=simon@josefsson.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).