[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling Elisp to a native code with a GCC plugin
From: |
Lars Magne Ingebrigtsen |
Subject: |
Re: Compiling Elisp to a native code with a GCC plugin |
Date: |
Fri, 17 Sep 2010 15:39:10 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
David Kastrup <address@hidden> writes:
> + end_byte = CHAR_TO_BYTE (end);
> +
> + if (! memcmp (SDATA (string), BYTE_POS_ADDR (start_byte),
> + end_byte - start_byte))
>
> That is assuming that both string and buffer are identically encoded
> (nowadays that likely means both have the same multibyteness).
Which brings me back to the other question I had, about buffer
internals. :-)
It was a guess based on Fbuffer_substring doing this:
memcpy (SDATA (result), BYTE_POS_ADDR (start_byte), end_byte - start_byte);
So I thought that if you could create a string by just memcpy()-ing data
from the buffer, then it seemed likely that you could compare them with
memcmp(). But that's probably wrong?
--
(domestic pets only, the antidote for overdose, milk.)
address@hidden * Lars Magne Ingebrigtsen
- Re: Compiling Elisp to a native code with a GCC plugin, (continued)
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Stephen J. Turnbull, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Stephen J. Turnbull, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Stephen J. Turnbull, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin,
Lars Magne Ingebrigtsen <=
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Eli Zaretskii, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Andreas Schwab, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/17