From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78355 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: bizarre byte-compile issue, possibly due to EIEIO Date: Tue, 05 Apr 2011 18:38:23 +0200 Message-ID: <87lizomz5s.fsf@randomsample.de> References: <87hbahww99.fsf@lifelogs.com> <8762qxo4l3.fsf@lifelogs.com> <87lizs9w5e.fsf@randomsample.de> <87sjtzznil.fsf@randomsample.de> <8762qub9q5.fsf@lifelogs.com> <87tyeeyqrx.fsf@randomsample.de> <87oc4k66at.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1302021579 26714 80.91.229.12 (5 Apr 2011 16:39:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Apr 2011 16:39:39 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 05 18:39:34 2011 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 1Q79Hx-0003wR-QH for ged-emacs-devel@m.gmane.org; Tue, 05 Apr 2011 18:39:33 +0200 Original-Received: from localhost ([127.0.0.1]:44951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q79Hx-0000hY-9i for ged-emacs-devel@m.gmane.org; Tue, 05 Apr 2011 12:39:33 -0400 Original-Received: from [140.186.70.92] (port=39661 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q79Hn-0000cl-0H for emacs-devel@gnu.org; Tue, 05 Apr 2011 12:39:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q79Hl-0000fh-2E for emacs-devel@gnu.org; Tue, 05 Apr 2011 12:39:22 -0400 Original-Received: from v3-1008.vxen.de ([79.140.41.8]:58530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q79Hk-0000cn-MI for emacs-devel@gnu.org; Tue, 05 Apr 2011 12:39:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=dY+lIryyrryyJT3c3wUemRO/aupfLfwdRvn/tzWwfXg=; b=FQUyOX6Mvuv66AX3Na1KdkGDjh6DGGH3rqdpN7GiH3c7RR+ezfyav1BcFMGCjRj4ZkZIQLePFLi1pod2/dMiFSYUadsOHVZKcxwOo5iexuqtdg+GKptQ8hUQ2i0BzGi/; Original-Received: from dslc-082-083-054-069.pools.arcor-ip.net ([82.83.54.69] helo=spaten) by v3-1008.vxen.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Q79Hc-0006Z0-Ai; Tue, 05 Apr 2011 18:39:12 +0200 In-Reply-To: <87oc4k66at.fsf@lifelogs.com> (Ted Zlatanov's message of "Tue, 05 Apr 2011 10:56:10 -0500") User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Mail-Followup-To: Ted Zlatanov , ding@gnus.org, emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 79.140.41.8 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:138185 gmane.emacs.gnus.general:78355 Archived-At: Ted Zlatanov writes: > On Mon, 04 Apr 2011 17:34:10 +0200 David Engster wrote: > > DE> I wasn't thinking. The constructor has to check if there was an initarg > DE> provided for 'data', otherwise it will overwrite it. Hence you have to > DE> use something like > > DE> (defmethod initialize-instance :after ((this registry-db) slots) > DE> "Set value of data slot of THIS after initialization." > DE> ;; 'data' will already be set if read from file, so don't overwrite it. > DE> (with-slots (data tracker) this > DE> (unless (member :data slots) > DE> (setq data (make-hash-table :size 10000 :rehash-size 2.0 :test 'equal))) > DE> (unless (member :tracker slots) > DE> (setq tracker (make-hash-table :size 100 :rehash-size 2.0))))) > > DE> This is also why you shouldn't set the other slot values here. [...] > I took your advice on both the constructor and the type. The updates > plus some bug fixes are pushed. I'll test it a bit and if it works OK > will merge the "tzz-gnus-registry-rewrite" branch into "master". I saw that you now set every slot value in the :after method. This isn't necessary; :initform is absolutely save to use for symbols. The only thing that changed in EIEIO is for the case where :initform is a function which has to be evaluated, which is only working correctly in newer versions. -David