From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78352 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: bizarre byte-compile issue, possibly due to EIEIO Date: Tue, 05 Apr 2011 10:56:10 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87oc4k66at.fsf@lifelogs.com> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1302019058 10519 80.91.229.12 (5 Apr 2011 15:57:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Apr 2011 15:57:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: ding@gnus.org Original-X-From: ding-owner+M26658@lists.math.uh.edu Tue Apr 05 17:57:34 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q78dE-000054-Fd for ding-account@gmane.org; Tue, 05 Apr 2011 17:57:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Q78cK-0000Om-OJ; Tue, 05 Apr 2011 10:56:32 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Q78cJ-0000Oc-QG for ding@lists.math.uh.edu; Tue, 05 Apr 2011 10:56:31 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Q78cB-00033z-VC for ding@lists.math.uh.edu; Tue, 05 Apr 2011 10:56:25 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Q78cB-0005My-EY for ding@gnus.org; Tue, 05 Apr 2011 17:56:23 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q78cB-0007kH-2O for ding@gnus.org; Tue, 05 Apr 2011 17:56:23 +0200 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Apr 2011 17:56:23 +0200 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Apr 2011 17:56:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:FqkDYeHrJ12+LpcUuWrHsL27oc4= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78352 gmane.emacs.devel:138180 Archived-At: 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. DE> BTW, you can use DE> :type hash-table DE> for 'tracker' and 'data'. It will then use 'hash-table-p' for checking DE> the provided argument. 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". Thanks! Ted