all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <antipov@mvista.com>
To: emacs-devel@gnu.org
Subject: [PATCH] useless GCPROs
Date: Mon, 21 Nov 2011 14:24:45 +0400	[thread overview]
Message-ID: <4ECA26ED.1060509@yandex.ru> (raw)

[-- 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.  */


                 reply	other threads:[~2011-11-21 10:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4ECA26ED.1060509@yandex.ru \
    --to=antipov@mvista.com \
    --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 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.