* [PATCH] useless GCPROs
@ 2011-11-21 10:24 Dmitry Antipov
0 siblings, 0 replies; only message in thread
From: Dmitry Antipov @ 2011-11-21 10:24 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 138 bytes --]
Since old_charpos and old_bytepos are integers, they can't point to
Lisp objects. So, GCPROs are just a redundant no-op for them.
Dmitry
[-- Attachment #2: drop_gcpros.patch --]
[-- Type: text/plain, Size: 1057 bytes --]
=== modified file 'src/ChangeLog'
--- src/ChangeLog 2011-11-21 06:05:16 +0000
+++ src/ChangeLog 2011-11-21 10:15:11 +0000
@@ -1,3 +1,8 @@
+2011-11-21 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * indent.c (Fvertial_motion): Remove useless GCPROs
+ for old_charpos and old_bytepos.
+
2011-11-21 Chong Yidong <cyd@gnu.org>
* window.c (Fnext_window, Fprevious_window): Doc fix.
=== modified file 'src/indent.c'
--- src/indent.c 2011-11-14 23:59:56 +0000
+++ src/indent.c 2011-11-21 10:12:01 +0000
@@ -1977,7 +1977,7 @@
struct window *w;
Lisp_Object old_buffer;
EMACS_INT old_charpos IF_LINT (= 0), old_bytepos IF_LINT (= 0);
- struct gcpro gcpro1, gcpro2, gcpro3;
+ struct gcpro gcpro1;
Lisp_Object lcols = Qnil;
double cols IF_LINT (= 0);
void *itdata = NULL;
@@ -1998,7 +1998,7 @@
w = XWINDOW (window);
old_buffer = Qnil;
- GCPRO3 (old_buffer, old_charpos, old_bytepos);
+ GCPRO1 (old_buffer);
if (XBUFFER (w->buffer) != current_buffer)
{
/* Set the window's buffer temporarily to the current buffer. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-21 10:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 10:24 [PATCH] useless GCPROs Dmitry Antipov
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.