emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101574: Cast SPECPDL_INDEX to int, a


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101574: Cast SPECPDL_INDEX to int, and do further EMACS_INT/int cleanups.
Date: Thu, 23 Sep 2010 22:57:48 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101574
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Thu 2010-09-23 22:57:48 +0200
message:
  Cast SPECPDL_INDEX to int, and do further EMACS_INT/int cleanups.
modified:
  src/ChangeLog
  src/editfns.c
  src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-09-23 20:16:55 +0000
+++ b/src/ChangeLog     2010-09-23 20:57:48 +0000
@@ -1,5 +1,10 @@
 2010-09-23  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * lisp.h (SPECPDL_INDEX): Cast to int, since we're not going to
+       unwind_protect more than 2GB worth of functions.
+
+       * editfns.c (Finsert_char): EMACS_INT/int cleanup.
+
        * lisp.h: Have oblookup take EMACS_INT to allow interning big
        string and avoid compiler warnings.
        (USE_SAFE_ALLOCA): Cast to int to avoid compilation warnings in

=== modified file 'src/editfns.c'
--- a/src/editfns.c     2010-09-23 19:18:30 +0000
+++ b/src/editfns.c     2010-09-23 20:57:48 +0000
@@ -2270,7 +2270,7 @@
   (Lisp_Object character, Lisp_Object count, Lisp_Object inherit)
 {
   register unsigned char *string;
-  register int strlen;
+  register EMACS_INT strlen;
   register int i;
   register EMACS_INT n;
   int len;
@@ -2955,7 +2955,7 @@
   register unsigned char *tt;  /* Trans table. */
   register int nc;             /* New character. */
   int cnt;                     /* Number of changes made. */
-  int size;                    /* Size of translate table. */
+  EMACS_INT size;              /* Size of translate table. */
   EMACS_INT pos, pos_byte, end_pos;
   int multibyte = !NILP (current_buffer->enable_multibyte_characters);
   int string_multibyte;
@@ -3026,7 +3026,7 @@
            }
          else
            {
-             int c;
+             EMACS_INT c;
 
              nc = oc;
              val = CHAR_TABLE_REF (table, oc);
@@ -3239,7 +3239,7 @@
        /* The restriction has changed from the saved one, so restore
           the saved restriction.  */
        {
-         int pt = BUF_PT (buf);
+         EMACS_INT pt = BUF_PT (buf);
 
          SET_BUF_BEGV_BOTH (buf, beg->charpos, beg->bytepos);
          SET_BUF_ZV_BOTH (buf, end->charpos, end->bytepos);

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2010-09-23 20:16:55 +0000
+++ b/src/lisp.h        2010-09-23 20:57:48 +0000
@@ -1881,7 +1881,7 @@
 
 extern EMACS_INT max_specpdl_size;
 
-#define SPECPDL_INDEX()        (specpdl_ptr - specpdl)
+#define SPECPDL_INDEX()        ((int) (specpdl_ptr - specpdl))
 
 /* Everything needed to describe an active condition case.  */
 struct handler


reply via email to

[Prev in Thread] Current Thread [Next in Thread]