From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 9943@debbugs.gnu.org
Subject: bug#9943: 24.0.91; Abort in check_glyph_memory
Date: Fri, 04 Nov 2011 11:12:13 +0200 [thread overview]
Message-ID: <83ty6kl09e.fsf@gnu.org> (raw)
In-Reply-To: <jwv7h3gd8xm.fsf-monnier+emacs@gnu.org>
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Glenn Morris <rgm@gnu.org>, 9943@debbugs.gnu.org
> Date: Thu, 03 Nov 2011 20:35:04 -0400
>
> > Thanks, I installed the same fix in xfns.c.
>
> All this code duplication is really a bore. We should really create
> a new file (say "dispfns.c") where we can consolidate common code from
> xfns, nsfns, and w32fns.
I agree. How about filing a wishlist bug for that?
> A good start would be that whenever we have to make the same fix at
> all 3 places, we rearrange the code locally to call a new function
> in dispfns.c which would receive the common part where the fix can
> then be applied.
The problem is that the code is similar, but different, with
platform-specific fragments sprinkled all over. So refactoring it
into a single implementation is not a trivial job. Making a function
out of every common fragment is not the best idea, since it will
typically depend on local and static variables and static functions.
Quite to the opposite: extracting platform-specific snippets into
functions with platform-specific implementation might be a better
idea. Or not, it all depends on careful analysis that should be done
as a prerequisite to deciding which way is better.
So it's not an easy editing job, even if you want to approach this
incrementally. I think it's rather a refactoring project that should
be taken as a whole, or maybe as a few large sub-jobs.
next prev parent reply other threads:[~2011-11-04 9:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 9:17 bug#9943: 24.0.91; Abort in check_glyph_memory martin rudalics
2011-11-03 19:08 ` Eli Zaretskii
2011-11-03 19:58 ` Glenn Morris
2011-11-03 21:05 ` Ken Brown
2011-11-03 21:59 ` Eli Zaretskii
2011-11-05 12:26 ` Jan Djärv
2011-11-05 13:18 ` Eli Zaretskii
2011-11-05 15:50 ` Jan Djärv
2011-11-05 16:27 ` Eli Zaretskii
2011-11-07 21:05 ` Glenn Morris
2011-11-03 21:57 ` Eli Zaretskii
2011-11-04 0:35 ` Stefan Monnier
2011-11-04 9:12 ` Eli Zaretskii [this message]
2011-11-04 16:53 ` Glenn Morris
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83ty6kl09e.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=9943@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.