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 16:18:30 +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> <87fwx8bhkq.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1284733143 20852 80.91.229.12 (17 Sep 2010 14:19:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Sep 2010 14:19:03 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 17 16:19:02 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 1OwbmG-0001Fb-Ke for ged-emacs-devel@m.gmane.org; Fri, 17 Sep 2010 16:19:00 +0200 Original-Received: from localhost ([127.0.0.1]:57379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwbmF-0004Pi-W1 for ged-emacs-devel@m.gmane.org; Fri, 17 Sep 2010 10:19:00 -0400 Original-Received: from [140.186.70.92] (port=48730 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Owbm7-0004NZ-6r for emacs-devel@gnu.org; Fri, 17 Sep 2010 10:18:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Owbm3-0000KR-Ud for emacs-devel@gnu.org; Fri, 17 Sep 2010 10:18:51 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:55856) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Owbm3-0000K0-HW for emacs-devel@gnu.org; Fri, 17 Sep 2010 10:18:47 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Owbm1-00011c-Td for emacs-devel@gnu.org; Fri, 17 Sep 2010 16:18:45 +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 16:18:45 +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 16:18:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 44 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUPDREVCBAPDhOTiXoU AApKLDUaEhcSEBVci6nPAAACU0lEQVQ4jWWTzU/cMBDFR1ZVrhi8OUe++Fx50143yIQrsGtzrUVi rsiH+t/vm3EKSB1pN9L88ubj2aF3GlVtuQxFS5gTcVxR285+j/gZj4raR/5rPFpyXxUfoudGyrX2 p+VDXGez+Itf76wlso6uGocB0JrB5c5ZDiodbAA5CrBVABcSkLUW8OAaiAMob61pKOZ8L6BVEEeO KzkTpzVIj+ND40qtg2ZiFHD0R0xllfSArhYGRsCJWDECsHTz0Qg4i4KnckI27zODCwNO1N7DFhhS 1h1wyLhYxIi3BeBysn2qfUHvNxCfXi84j7EreFHtp3u2edp2BS9oSRHA9vTK1sNE9KyNbHPvyg5+ iqkM3p8Tptp7VNiJVEza5C2VG6Rr7wF06EDvoNvO0YFOb2ZG8yaby+odzFMKAYDdws/9KwVL/DHI uLWSHdnL2+inZGbMFsRdbNBGbGJ38COjFJJyE+XAbieUCiEI4IDCtjrSYQfrugNHVp63vDlAWDpQ ihQTTBU7COEa7o4MlB1VO8DzJxbk8JsLwRLsUS2DhMZmKQCuMlA44lo7MCsDyxncdnuFgYeylTXc r0NZni17xAAmk86HYsJS4tPyC217D2bZDMmEoM9pfsYn45TjmSHJesCNW01MyzPexaj8urP06hO+ WgEvACNKkVzUs/9ZBp2LADRRHZCARReA8sKWWHEK1bZzAtBoXt7EW0tV0BZLmRnEfKNoRzzZIRYd QgnnKV+L3VYOCyBh8TAHKD4Bx5CxOCLGfKKvYeb/wLv8f1sYzAGXq4PvfwFj2/xGAtYVNAAAAABJ RU5ErkJggg== Mail-Copies-To: never X-Now-Playing: Depeche Mode's _Black Celebration_ User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:7JMZs+1zyf3IRlRxy0k5ULFNJ0Q= 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:130308 Archived-At: David Kastrup writes: > Fbuffer_substring also likely copies the multibyteness, not just the > bytes. Yes, probably, but I don't know what that means. The code, in more fullness, is: if (start < GPT && GPT < end) move_gap (start); if (! NILP (current_buffer->enable_multibyte_characters)) result = make_uninit_multibyte_string (end - start, end_byte - start_byte); else result = make_uninit_string (end - start); memcpy (SDATA (result), BYTE_POS_ADDR (start_byte), end_byte - start_byte); So no matter whether it creates a "multibyte string" or not (and I don't know what the difference is), it still just does a memcpy from the buffer representation over to the string representation. But I've now read "33.1 Text Representations", and I think I understand a bit better. If you have a unibyte string with the bytes #x68 #xe9 #x6c #x6c #x6f in it, and you have a multibyte buffer with the string héllo in it, then they won't match. But are they supposed to? (equal (unibyte-string #x68 #xe9 #x6c #x6c #x6f) "héllo") => nil I guess not. So I'm thinking the memcmp() is sufficient to give the desired result. Isn't it? -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen