bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34873: 27.0.50; Creating unibyte string in emacs modules


From: Basil L. Contovounesios
Subject: bug#34873: 27.0.50; Creating unibyte string in emacs modules
Date: Tue, 07 May 2019 20:24:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Cc: <lg.zevlg@gmail.com>,  <34873@debbugs.gnu.org>
>> Date: Tue, 07 May 2019 17:55:56 +0100
>> 
>> Sorry if this is a dumb question, but would the functions
>> unibyte-string, string-to-unibyte, string-as-unibyte et al. be of any
>> use here?
>
> I'm not sure I follow: how can these functions help writing code in a
> module?  A module cannot be written in Lisp, and you cannot call these
> functions on a C string, only on a Lisp string.
>
> What am I missing?

It could be I that is missing something, but AIUI the module API already
provides module_make_string for creating a multibyte Lisp string from a
C string, which can then be passed to one of the aforementioned
functions via module_funcall, no?

In other words, I'm asking whether the aforementioned functions are in
any way a better alternative to the encode-coding-string approach
previously proposed.

Thanks,

-- 
Basil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]