From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Using uniprop_table_lookup Date: Tue, 09 Aug 2011 13:31:00 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1312864276 3066 80.91.229.12 (9 Aug 2011 04:31:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2011 04:31:16 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 09 06:31:12 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QqdyC-0007Kg-EI for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2011 06:31:12 +0200 Original-Received: from localhost ([::1]:33963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqdyB-00067Q-FS for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2011 00:31:11 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqdy8-000674-EZ for emacs-devel@gnu.org; Tue, 09 Aug 2011 00:31:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qqdy7-0005WG-2v for emacs-devel@gnu.org; Tue, 09 Aug 2011 00:31:08 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:52640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqdy6-0005WB-Ik; Tue, 09 Aug 2011 00:31:07 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id p794V1Up014065; Tue, 9 Aug 2011 13:31:02 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id p794V17E029639; Tue, 9 Aug 2011 13:31:01 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id p794V0MW014252; Tue, 9 Aug 2011 13:31:00 +0900 (JST) env-from (handa@m17n.org) In-Reply-To: (message from Stefan Monnier on Mon, 08 Aug 2011 21:32:27 -0400) X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-Received-From: 150.29.246.133 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143039 Archived-At: In article , Stefan Monnier writes: > > No. All returned tables by uniprop_table are stored in > > Vchar_code_property_alist which is DEFVAR_LISPed in > > chartab.c. It means that the next call of uniprop_table > > with the same PROP argument just returns the already loaded > > one, and thus fast. > But since Eli says that he initializes bidi_class_table only once and > never touches it again, if he doesn't staticpro that variable and > someone does someone changes Vchar_code_property_alist, you could end up > with bidi_class_table pointing to a dead object. Ah, yes, you are right. I misunderstood. > There's no point wasting time trying to figure out whether a global > Lisp_Object should be staticpro'd or not: just staticpro it and > move on. In 99% of the cases it's the only safe choice and the > remaining 1% is not worth the trouble worrying about. --- Kenichi Handa handa@m17n.org