From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Compiling Elisp to a native code with a GCC plugin Date: Sat, 18 Sep 2010 23:19:11 +0900 Message-ID: <87eicrxhgg.fsf@uwakimon.sk.tsukuba.ac.jp> 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> <8739t8bepl.fsf@lola.goethe.zz> <87tylo9vou.fsf@lola.goethe.zz> <87pqwc9tnm.fsf@lola.goethe.zz> <87hbhoxkuw.fsf@uwakimon.sk.tsukuba.ac.jp> <83wrqkytp2.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1284821003 9962 80.91.229.12 (18 Sep 2010 14:43:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 18 Sep 2010 14:43:23 +0000 (UTC) Cc: dak@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 18 16:43:21 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 1OwydM-0006T2-V8 for ged-emacs-devel@m.gmane.org; Sat, 18 Sep 2010 16:43:21 +0200 Original-Received: from localhost ([127.0.0.1]:42568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwydM-000332-IU for ged-emacs-devel@m.gmane.org; Sat, 18 Sep 2010 10:43:20 -0400 Original-Received: from [140.186.70.92] (port=38457 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwydG-00032w-I4 for emacs-devel@gnu.org; Sat, 18 Sep 2010 10:43:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OwydF-0006Og-Fw for emacs-devel@gnu.org; Sat, 18 Sep 2010 10:43:14 -0400 Original-Received: from [130.158.254.170] (port=54507 helo=dmail01.cc.tsukuba.ac.jp) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwydE-0006NN-2C; Sat, 18 Sep 2010 10:43:12 -0400 Original-Received: from imss12.cc.tsukuba.ac.jp (unknown [130.158.254.130]) by dmail01.cc.tsukuba.ac.jp (Postfix) with ESMTP id DEFADE05DF; Sat, 18 Sep 2010 23:26:24 +0900 (JST) Original-Received: from imss12.cc.tsukuba.ac.jp (imss12.cc.tsukuba.ac.jp [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id BEF31F4003; Sat, 18 Sep 2010 23:26:06 +0900 (JST) Original-Received: from mgmt1.sk.tsukuba.ac.jp (unknown [130.158.97.223]) by imss12.cc.tsukuba.ac.jp (Postfix) with ESMTP id AF4D3F4002; Sat, 18 Sep 2010 23:26:06 +0900 (JST) Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id AD2AD3FA049A; Sat, 18 Sep 2010 23:26:06 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 7525D1A3A8A; Sat, 18 Sep 2010 23:19:11 +0900 (JST) In-Reply-To: <83wrqkytp2.fsf@gnu.org> X-Mailer: VM undefined under 21.5 (beta29) "garbanzo" ed3b274cc037 XEmacs Lucid (x86_64-unknown-linux) 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:130404 Archived-At: Eli Zaretskii writes: > However, AFAIK Emacs always makes a unibyte string if all the > characters are pure ASCII. So this does not matter in practice. That's true in Stefan's personal Emacs, AIUI, but otherwise I bet aset on a multibyte string can turn it into pure ASCII. > > (defun string-byte-count (s) > > (length (if (string-multibyte-p s) (encode-coding-string s > > 'utf-8) s))) > > See above: this is not accurate. I don't understand what "above" you're referring to. Unless maybe you mean because in unibyte strings the byte count is negative?