From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Compiling Elisp to a native code with a GCC plugin Date: Fri, 17 Sep 2010 15:39:10 +0200 Organization: Programmerer Ingebrigtsen Message-ID: References: <87bp805ecr.fsf@gmail.com> <87iq26z97e.fsf@uwakimon.sk.tsukuba.ac.jp> <87y6b0yi8o.fsf@uwakimon.sk.tsukuba.ac.jp> <87sk18bioh.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1284730936 10326 80.91.229.12 (17 Sep 2010 13:42:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Sep 2010 13:42:16 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 17 15:42:15 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OwbCh-00040c-0t for ged-emacs-devel@m.gmane.org; Fri, 17 Sep 2010 15:42:15 +0200 Original-Received: from localhost ([127.0.0.1]:48066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwbCg-0005Nu-IR for ged-emacs-devel@m.gmane.org; Fri, 17 Sep 2010 09:42:14 -0400 Original-Received: from [140.186.70.92] (port=59928 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwbCa-0005MG-5Y for emacs-devel@gnu.org; Fri, 17 Sep 2010 09:42:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OwbCW-0000YW-HD for emacs-devel@gnu.org; Fri, 17 Sep 2010 09:42:07 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:44139) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwbCW-0000YL-5J for emacs-devel@gnu.org; Fri, 17 Sep 2010 09:42:04 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OwbCQ-0003ma-3g for emacs-devel@gnu.org; Fri, 17 Sep 2010 15:41:58 +0200 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Sep 2010 15:41:58 +0200 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Sep 2010 15:41:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 24 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUBAQNRHyYEBAUAAAFY XG4CAgQBAgPDvbcMBwoCAgLJIrQxAAACbElEQVQ4jWVUPYvcMBAVHE4vEJzLoCDwdkvEBVQaBL5y 0aFCXZoLpFwwuF6RQmXAKDD/Nm+k/eC4AYM8T28+pDcSWeuplDwVPemiSw74KzlPIk8adnBxYlzr GPTEmwW7DVXdbdrYVu+9ABrIphBjBBA+AJroQJRqTG7owLKtohiKZBIAioZeroBvANV9t5ZcjKk+ GNnsjuB31nFARF88m9BIu9uG0P6dpPISn1co10RyHIlRK9nUq//DfUT6Zoncbl9ssxqM1lzuvted HDJxLpgL6B/AAR74bU2dQDXoxkAHMICxE2psQNGxAuFyHVNQx2AYmLKJqB+emv42yvHEpya83/yy fTZxW6yfgdWv12MAe7suFgC+FDlK6W/WrgOAfy0SwIVPiD3bsnVgHS+zmscRPC9nufS4DGx+BmUs lxZu8XPPcZbqrDqgvOrBQEJVcF74rMeL6oX69bmVe5alXcIoZ25H8fqsAMyyG3j+/qNaqDtwN8U5 bo7x4ZfzM4DCKZT8YChD+NZxqxMNPA5G5KzNDlUT4d7MSRyfBpbxJCYd+WrtSxqgF8EXNbC+hc7Q MuTx4ws2np6O9ihiByAr168WDmEF+zuQdg4FXRlQHAcK4cogCIX3w4bhFDCLkXNAI+D+4wAQeHjD EDYADLv3/dA3okFWpgEJesbQxHeew9MJfYQGoAtUBcovJgnxBIWCLEKqNb7xPMNt4vvXOCBSmEQ4 YCrfQNHBIMRPfIEfAYGiXDKUWOFw/uYCDAM6Y5arOfCwIBwDvAcMrEx7MVjjuiXmZ4dHzeBXtwcI HhALXqEi8OIEfnia5dKczPgPd5FSJEFcq9AAAAAASUVORK5CYII= Mail-Copies-To: never X-Now-Playing: Depeche Mode's _Stripped_: "But not tonight" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:fEX2mO8Y8SPUYS0SGqizCsuMSTA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130303 Archived-At: David Kastrup 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.) larsi@gnus.org * Lars Magne Ingebrigtsen