From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Cc: emacs-devel@gnu.org
Subject: Re: bizarre byte-compile issue, possibly due to EIEIO
Date: Tue, 05 Apr 2011 10:56:10 -0500 [thread overview]
Message-ID: <87oc4k66at.fsf@lifelogs.com> (raw)
In-Reply-To: 87tyeeyqrx.fsf@randomsample.de
On Mon, 04 Apr 2011 17:34:10 +0200 David Engster <deng@randomsample.de> 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
next prev parent reply other threads:[~2011-04-05 15:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 20:29 bizarre byte-compile issue, possibly due to EIEIO Ted Zlatanov
2011-04-01 20:31 ` Ted Zlatanov
2011-04-01 20:50 ` Lars Magne Ingebrigtsen
2011-04-02 0:54 ` Ted Zlatanov
2011-04-02 20:34 ` Lars Magne Ingebrigtsen
2011-04-04 13:47 ` Ted Zlatanov
2011-04-04 15:26 ` David Engster
2011-04-02 21:32 ` David Engster
2011-04-03 9:34 ` David Engster
2011-04-04 10:18 ` Ted Zlatanov
2011-04-04 15:34 ` David Engster
2011-04-05 15:56 ` Ted Zlatanov [this message]
2011-04-05 16:38 ` David Engster
2011-04-05 17:55 ` Ted Zlatanov
2011-04-05 18:31 ` David Engster
2011-04-05 18:44 ` Ted Zlatanov
2011-04-05 16:14 ` Ted Zlatanov
2011-04-05 17:57 ` Ted Zlatanov
2011-04-04 16:29 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oc4k66at.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).