public inbox for [email protected]  
help / color / mirror / Atom feed
From: Joel Jacobson <[email protected]>
To: [email protected]
Subject: Re: [PATCH] Add get_bytes() and set_bytes() functions
Date: Wed, 14 Aug 2024 13:21:49 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJ7c6TPtOp6+kFX5QX3fH1SVr7v65uHr-7yEJ=GMGQi5uhGtcA@mail.gmail.com>
References: <CAJ7c6TPtOp6+kFX5QX3fH1SVr7v65uHr-7yEJ=GMGQi5uhGtcA@mail.gmail.com>

On Wed, Aug 14, 2024, at 13:01, Aleksander Alekseev wrote:
> The proposed patch adds get_bytes() and set_bytes() functions. The
> semantics is similar to get_byte() and set_byte() we already have but
> the functions operate with bigints rather than bytes and the user can
> specify the size of the integer. This allows working with int2s,
> int4s, int8s or even int5s if needed.

+1

I wanted this myself many times.

I wonder if get_bytes() and set_bytes() will behave differently
on little-endian vs big-endian systems?

If so, then I think it would be nice to enforce a consistent byte order
(e.g., big-endian), to ensure consistent behavior across platforms.

Regards,
Joel






view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [PATCH] Add get_bytes() and set_bytes() functions
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox