From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: A question about struct coding_system Date: Mon, 21 Nov 2011 12:47:04 -0500 Message-ID: References: <4ECA78BD.4040904@yandex.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1321897639 20886 80.91.229.12 (21 Nov 2011 17:47:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2011 17:47:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 21 18:47:15 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 1RSXxa-0006vM-2o for ged-emacs-devel@m.gmane.org; Mon, 21 Nov 2011 18:47:14 +0100 Original-Received: from localhost ([::1]:45609 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSXxZ-000051-N5 for ged-emacs-devel@m.gmane.org; Mon, 21 Nov 2011 12:47:13 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:47321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSXxW-0008WH-L1 for emacs-devel@gnu.org; Mon, 21 Nov 2011 12:47:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSXxS-0004FD-Ja for emacs-devel@gnu.org; Mon, 21 Nov 2011 12:47:10 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:6578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSXxS-0004F3-H0 for emacs-devel@gnu.org; Mon, 21 Nov 2011 12:47:06 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAEWOyk5FxIAT/2dsb2JhbABDqjyBBoFyAQEEAVYjBQsLNBIUGA0kiBa0ZYoXBIgalSSEVoRL X-IronPort-AV: E=Sophos;i="4.69,548,1315195200"; d="scan'208";a="148882958" Original-Received: from 69-196-128-19.dsl.teksavvy.com (HELO pastel.home) ([69.196.128.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 21 Nov 2011 12:47:05 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id DE5C958CB6; Mon, 21 Nov 2011 12:47:04 -0500 (EST) In-Reply-To: <4ECA78BD.4040904@yandex.ru> (Dmitry Antipov's message of "Mon, 21 Nov 2011 20:13:49 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:146113 Archived-At: > At a first glance, struct coding_system should be a vector-like > object with src_object and dst_object at the beginning. But it > isn't, and it looks like that src_object and dst_object are never > marked directly. Thus, it should be guaranteed that, for any > coding_system, objects referenced by src_object and dst_object > are always reachable from another live objects. But I can't > find any code that takes care about this, so I don't understand > why and how it works at all :-(. It may very well work just by accident (the "global" coding_system objects have src/dst_object fields that contain globally live objects such as nil, while the others point to objects that are also reachable via some local variable). Stefan