[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some dynamic module questions
From: |
Helmut Eller |
Subject: |
Re: Some dynamic module questions |
Date: |
Fri, 27 Nov 2020 13:59:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On Fri, Nov 27 2020, Eli Zaretskii wrote:
>> But that's only for passing bytes from C to Lisp. What about the other
>> direction?
>
> Why do you need that? The concept of unibyte vs multibyte strings
> exists only in Lisp; in C you just have a sequence of 'char' bytes,
> and the way you interpret it depends on your C code.
>
> If you have some specific use case where this looks like a necessity,
> can you describe that use case?
I'm writing (or trying to write) ELisp bindings for Cap’n Proto[1],
which is an RPC system along with a data interchange format. Cap'n
Proto has (among other things[2]) these two data types:
- Text: is always UTF-8 encoded and NUL-terminated.
- Data: is a completely arbitrary sequence of bytes.
My plan is to map Text to Elisp (multibyte)strings and Data to unibyte
strings.
Helmut
[1] https://capnproto.org/
[2] https://capnproto.org/language.html
- Some dynamic module questions, Helmut Eller, 2020/11/27
- Re: Some dynamic module questions, Philipp Stephani, 2020/11/27
- Re: Some dynamic module questions, Helmut Eller, 2020/11/27
- Re: Some dynamic module questions, Eli Zaretskii, 2020/11/27
- Re: Some dynamic module questions,
Helmut Eller <=
- Re: Some dynamic module questions, Eli Zaretskii, 2020/11/27
- Re: Some dynamic module questions, Eli Zaretskii, 2020/11/27
- Re: Some dynamic module questions, Vasilij Schneidermann, 2020/11/27
- Re: Some dynamic module questions, Eli Zaretskii, 2020/11/27
- Re: Some dynamic module questions, Vasilij Schneidermann, 2020/11/27
- Re: Some dynamic module questions, Eli Zaretskii, 2020/11/27
- Re: Some dynamic module questions, Stefan Monnier, 2020/11/27