From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] [PATCH] Fix rune size in `acid`
Date: Wed, 03 May 2023 13:54:48 -0400 [thread overview]
Message-ID: <1C631E48FC0511FA69A0342C80D45005@eigenstate.org> (raw)
In-Reply-To: <CS46OWSDVPK3.10AKPB8RTRU56@meagr>
Quoth grimmware <oholiab@grimmwa.re>:
> --- a/sys/src/cmd/acid/exec.c
> +++ b/sys/src/cmd/acid/exec.c
> @@ -244,6 +244,7 @@
> uchar cval;
> ushort sval;
> char buf[512], reg[12];
> + int rsize;
>
> r->op = OCONST;
> r->fmt = fmt;
> @@ -264,7 +265,6 @@
> case 'u':
> case 'o':
> case 'q':
> - case 'r':
> r->type = TINT;
> ret = get2(m, addr, &sval);
> if (ret < 0)
> @@ -286,6 +286,7 @@
> case 'U':
> case 'O':
> case 'Q':
> + case 'r':
> r->type = TINT;
> ret = get4(m, addr, &lval);
> if (ret < 0)
> @@ -317,12 +318,13 @@
> r->string = strnode(buf);
> break;
> case 'R':
> + rsize = sizeof(Rune);
why make rsize a variable? seems like you could just directly
use sizeof(Rune).
next prev parent reply other threads:[~2023-05-03 17:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-23 13:53 grimmware
2023-05-03 17:54 ` ori [this message]
2023-05-03 18:54 ` Matt Carroll
2023-05-03 19:05 ` Matt Carroll
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1C631E48FC0511FA69A0342C80D45005@eigenstate.org \
--to=ori@eigenstate.org \
--cc=9front@9front.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 NNTP newsgroup(s).