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: [RFC, PATCH] shrink struct vectorlike_header #2 Date: Tue, 06 Nov 2012 13:17:59 -0500 Message-ID: References: <50766A2C.8070705@yandex.ru> <50994448.6020602@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352225903 26554 80.91.229.3 (6 Nov 2012 18:18:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Nov 2012 18:18:23 +0000 (UTC) Cc: Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 06 19:18:33 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TVnjM-0000uo-Cl for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2012 19:18:32 +0100 Original-Received: from localhost ([::1]:49966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVnjD-0000UP-DI for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2012 13:18:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVnj6-0000UG-HN for emacs-devel@gnu.org; Tue, 06 Nov 2012 13:18:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVnj0-0007eF-9q for emacs-devel@gnu.org; Tue, 06 Nov 2012 13:18:16 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:60575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVniz-0007ax-2f for emacs-devel@gnu.org; Tue, 06 Nov 2012 13:18:10 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id qA6IHx7n030775; Tue, 6 Nov 2012 13:18:00 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 75EFBB4278; Tue, 6 Nov 2012 13:17:59 -0500 (EST) In-Reply-To: <50994448.6020602@yandex.ru> (Dmitry Antipov's message of "Tue, 06 Nov 2012 21:09:28 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4394=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4394> : streams <852910> : uri <1261671> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:154705 Archived-At: > +/* When V is on the free list, first word after header is > + used as a pointer to next vector on the free list. */ > + > +#define NEXT_IN_FREE_LIST(v) \ > + (*(struct Lisp_Vector **)((char *) v + header_size)) > + > /* Common shortcut to setup vector on a free list. */ Why change the comment rather than the code. IOW what don't you like in: Please make the code match the comment, e.g: (*(struct Lisp_Vector **)&(v->contents[0])) I personally find it much more elegant and robust than doing pointer arithmetic via conversion to char*. The rest looks fine, tho it still probably lacks the corresponding changes in .gdbinit, right? Stefan