From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: No GCPRO in directory-files and directory-files-and-attributes
Date: Sun, 21 Dec 2003 23:08:32 -0500 [thread overview]
Message-ID: <E1AYHMu-0005QX-Tj@fencepost.gnu.org> (raw)
In-Reply-To: <3FD769E4.5080402@math.ku.dk> (message from Lars Hansen on Wed, 10 Dec 2003 19:45:56 +0100)
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);
}
next prev parent reply other threads:[~2003-12-22 4:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-01 22:32 No GCPRO in directory-files and directory-files-and-attributes Lars Hansen
2003-12-09 21:49 ` Richard Stallman
2003-12-10 18:45 ` Lars Hansen
2003-12-22 4:08 ` Richard Stallman [this message]
2003-12-22 7:22 ` Lars Hansen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1AYHMu-0005QX-Tj@fencepost.gnu.org \
--to=rms@gnu.org \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).