emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src ChangeLog alloc.c eval.c


From: Dan Nicolaescu
Subject: [Emacs-diffs] emacs/src ChangeLog alloc.c eval.c
Date: Fri, 06 Nov 2009 05:24:31 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   09/11/06 05:24:30

Modified files:
        src            : ChangeLog alloc.c eval.c 

Log message:
        * alloc.c (make_pure_c_string): New function.
        
        * eval.c (Fautoload): Purecopy all arguments.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7837&r2=1.7838
http://cvs.savannah.gnu.org/viewcvs/emacs/src/alloc.c?cvsroot=emacs&r1=1.450&r2=1.451
http://cvs.savannah.gnu.org/viewcvs/emacs/src/eval.c?cvsroot=emacs&r1=1.317&r2=1.318

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7837
retrieving revision 1.7838
diff -u -b -r1.7837 -r1.7838
--- ChangeLog   5 Nov 2009 04:16:04 -0000       1.7837
+++ ChangeLog   6 Nov 2009 05:24:28 -0000       1.7838
@@ -1,3 +1,9 @@
+2009-11-06  Stefan Monnier  <address@hidden>
+
+       * alloc.c (make_pure_c_string): New function.
+
+       * eval.c (Fautoload): Purecopy all arguments.
+
 2009-11-05  Kenichi Handa  <address@hidden>
 
        * fileio.c (Finsert_file_contents): Be sure set coding-system of

Index: alloc.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/alloc.c,v
retrieving revision 1.450
retrieving revision 1.451
diff -u -b -r1.450 -r1.451
--- alloc.c     19 Oct 2009 04:27:11 -0000      1.450
+++ alloc.c     6 Nov 2009 05:24:30 -0000       1.451
@@ -4821,6 +4821,24 @@
   return string;
 }
 
+/* Return a string a string allocated in pure space.  Do not allocate
+   the string data, just point to DATA.  */
+
+Lisp_Object
+make_pure_c_string (const char *data)
+{
+  Lisp_Object string;
+  struct Lisp_String *s;
+  int nchars = strlen (data);
+
+  s = (struct Lisp_String *) pure_alloc (sizeof *s, Lisp_String);
+  s->size = nchars;
+  s->size_byte = -1;
+  s->data = data;
+  s->intervals = NULL_INTERVAL;
+  XSETSTRING (string, s);
+  return string;
+}
 
 /* Return a cons allocated from pure space.  Give it pure copies
    of CAR as car and CDR as cdr.  */

Index: eval.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/eval.c,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -b -r1.317 -r1.318
--- eval.c      24 Oct 2009 06:32:10 -0000      1.317
+++ eval.c      6 Nov 2009 05:24:30 -0000       1.318
@@ -2127,16 +2127,13 @@
     /* Only add entries after dumping, because the ones before are
        not useful and else we get loads of them from the loaddefs.el.  */
     LOADHIST_ATTACH (Fcons (Qautoload, function));
-
-  if (NILP (Vpurify_flag))
-    args[0] = file;
   else
-    args[0] = Fpurecopy (file);
-  args[1] = docstring;
-  args[2] = interactive;
-  args[3] = type;
-
-  return Ffset (function, Fcons (Qautoload, Flist (4, &args[0])));
+    /* We don't want the docstring in purespace (instead,
+       Snarf-documentation should (hopefully) overwrite it).  */
+    docstring = make_number (0);
+  return Ffset (function,
+               Fpurecopy (list5 (Qautoload, file, docstring,
+                                 interactive, type)));
 }
 
 Lisp_Object




reply via email to

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