~sircmpwn/hare-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH hare] strings::fromc: update documentation about invalid utf8

Details
Message ID
<20230212232819.22118-1-evan@d2evs.net>
DKIM signature
missing
Download raw message
Patch: +1 -1
Signed-off-by: Evan Johnston <evan@d2evs.net>
---
 strings/cstrings.ha | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/strings/cstrings.ha b/strings/cstrings.ha
index 8e6dec57..b8a377e4 100644
--- a/strings/cstrings.ha
+++ b/strings/cstrings.ha
@@ -27,7 +27,7 @@ export fn fromc_unsafe(cstr: *const char) const str = {
};

// Converts a C string to a Hare string in O(n). If the string is not valid
// UTF-8, abort.
// UTF-8, return utf8::invalid.
export fn fromc(cstr: *const char) (const str | utf8::invalid) = {
	let s = fromc_unsafe(cstr);
	return if (utf8::valid(s)) s else utf8::invalid;
-- 
2.39.1
Details
Message ID
<CQGZ3Z40I3B3.P0ZGQ0900KTQ@monch>
In-Reply-To
<20230212232819.22118-1-evan@d2evs.net> (view parent)
DKIM signature
missing
Download raw message
On Sun Feb 12, 2023 at 11:28 PM UTC, Evan Johnston wrote:
> @@ -27,7 +27,7 @@ export fn fromc_unsafe(cstr: *const char) const str = {
>  };
>  
>  // Converts a C string to a Hare string in O(n). If the string is not valid
> -// UTF-8, abort.
> +// UTF-8, return utf8::invalid.

This should be [[encoding::utf8::invalid]]

[hare/patches] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CQGZ4IFWPR8R.31T2ZXJ7HDI08@cirno2>
In-Reply-To
<20230212232819.22118-1-evan@d2evs.net> (view parent)
DKIM signature
missing
Download raw message
hare/patches: SUCCESS in 1m43s

[strings::fromc: update documentation about invalid utf8][0] from [Evan Johnston][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/38961
[1]: evan@d2evs.net

✓ #939451 SUCCESS hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/939451
✓ #939452 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/939452
Reply to thread Export thread (mbox)