[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `aset` on strings, changing the size in bytes
From: |
Eli Zaretskii |
Subject: |
Re: `aset` on strings, changing the size in bytes |
Date: |
Sat, 08 Sep 2018 23:59:47 +0300 |
> From: Stefan Monnier <address@hidden>
> Date: Sat, 08 Sep 2018 14:36:46 -0400
>
> The need for an indirection (a String_Object has to hold a pointer to an
> sdata object rather than being able to keep its payload directly in the
> Lisp_String object (using FLEXIBLE_ARRAY_MEMBER))
Why is that a problem?
> and the unexpected memory allocation behavior (users who aren't
> privy to the underlying implementation would never expect a
> primitive like `aset` to internally perform a copy of the string's
> bytes).
Only C-level programming sees that, and it will never see it if
strings are treated like buffers, i.e. not passed as C pointers to
text. So I don't see why this would be a problem, given the small
number of people who work at that level, and an even smaller number of
people who make changes in the low-level code which depends on that.
- Re: `aset` on strings, changing the size in bytes, (continued)
- Re: `aset` on strings, changing the size in bytes, Eli Zaretskii, 2018/09/08
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/08
- Re: `aset` on strings, changing the size in bytes, Eli Zaretskii, 2018/09/08
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/08
- Re: `aset` on strings, changing the size in bytes,
Eli Zaretskii <=
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/08
- Re: `aset` on strings, changing the size in bytes, Eli Zaretskii, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Richard Stallman, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Eli Zaretskii, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Noam Postavsky, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Eli Zaretskii, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Noam Postavsky, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Richard Stallman, 2018/09/10
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/09