changeset 31250:8929101e0c90

(openp): Prevent temporary string passed to Ffile_readable_p from being garbage collected.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 29 Aug 2000 10:37:38 +0000
parents c9d331838b1b
children 074828b159a6
files src/lread.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/lread.c	Tue Aug 29 09:35:04 2000 +0000
+++ b/src/lread.c	Tue Aug 29 10:37:38 2000 +0000
@@ -900,9 +900,12 @@
   int want_size;
   Lisp_Object filename;
   struct stat st;
-  struct gcpro gcpro1;
-
-  GCPRO1 (str);
+  struct gcpro gcpro1, gcpro2;
+  Lisp_Object string;
+
+  string = Qnil;
+  GCPRO2 (str, string);
+  
   if (storeptr)
     *storeptr = Qnil;
 
@@ -967,7 +970,6 @@
 	    handler = Ffind_file_name_handler (filename, Qfile_exists_p);
 	  if (! NILP (handler) && ! exec_only)
 	    {
-	      Lisp_Object string;
 	      int exists;
 
 	      string = build_string (fn);