emacs-devel
[Top][All Lists]
Advanced

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

Re: No GCPRO in directory-files and directory-files-and-attributes


From: Richard Stallman
Subject: Re: No GCPRO in directory-files and directory-files-and-attributes
Date: Sun, 21 Dec 2003 23:08:32 -0500

    Well, I don't know much about these things, but these lines are from call1:

        args[0] = fn;
        args[1] = arg1;
        GCPRO1 (args[0]);
        gcpro1.nvars = 2;
        RETURN_UNGCPRO (Ffuncall (2, args));

    To me it looks as the arguments are protcted.

Yes, I now recall you are right--whoever calls Ffuncall
needs to GCPRO the vector of args.

How about this patch?

*** dired.c.~1.106.~    Fri Nov 28 15:55:07 2003
--- dired.c     Sun Dec 21 23:15:55 2003
***************
*** 359,375 ****
       call the corresponding file handler.  */
    handler = Ffind_file_name_handler (directory, Qdirectory_files);
    if (!NILP (handler))
!     {
!       Lisp_Object args[6];
! 
!       args[0] = handler;
!       args[1] = Qdirectory_files;
!       args[2] = directory;
!       args[3] = full;
!       args[4] = match;
!       args[5] = nosort;
!       return Ffuncall (6, args);
!     }
  
    return directory_files_internal (directory, full, match, nosort, 0, Qnil);
  }
--- 359,366 ----
       call the corresponding file handler.  */
    handler = Ffind_file_name_handler (directory, Qdirectory_files);
    if (!NILP (handler))
!     return call5 (handler, Qdirectory_files, directory,
!                 full, match, nosort);
  
    return directory_files_internal (directory, full, match, nosort, 0, Qnil);
  }
***************
*** 395,412 ****
       call the corresponding file handler.  */
    handler = Ffind_file_name_handler (directory, 
Qdirectory_files_and_attributes);
    if (!NILP (handler))
!     {
!       Lisp_Object args[7];
! 
!       args[0] = handler;
!       args[1] = Qdirectory_files_and_attributes;
!       args[2] = directory;
!       args[3] = full;
!       args[4] = match;
!       args[5] = nosort;
!       args[6] = id_format;
!       return Ffuncall (7, args);
!     }
  
    return directory_files_internal (directory, full, match, nosort, 1, 
id_format);
  }
--- 386,393 ----
       call the corresponding file handler.  */
    handler = Ffind_file_name_handler (directory, 
Qdirectory_files_and_attributes);
    if (!NILP (handler))
!     return call6 (handler, Qdirectory_files_and_attributes,
!                 directory, full, match, nosort, id_format);
  
    return directory_files_internal (directory, full, match, nosort, 1, 
id_format);
  }




reply via email to

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