aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorDmitry Antipov2014-09-01 20:05:43 +0400
committerDmitry Antipov2014-09-01 20:05:43 +0400
commit50e9e580077869b2f2ced5916299bade6b4f4efd (patch)
tree911756b76f580c119c080770ff895e6955f0be95 /src/lread.c
parent203fb3639ace0e05284d9be5aa5c3d63701f33a4 (diff)
downloademacs-50e9e580077869b2f2ced5916299bade6b4f4efd.tar.gz
emacs-50e9e580077869b2f2ced5916299bade6b4f4efd.zip
Avoid extra calls to strlen in filesystem I/O routines.
* fileio.c (Fexpand_file_name): Avoid calls to strlen if the length of 'newdir' is known or may be precalculated. (file_accessible_directory_p): Prefer to pass Lisp_Object, not 'char *', and so use precalculated length. (Ffile_accessible_directory_p): * callproc.c (encode_current_directory, init_callproc): * charset.c (init_charset): * lread.c (load_path_check, load_path_default): Adjust users. * lisp.h (file_accessible_directory_p): Tweak prototype.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c
index 639d574ac6b..7626e16e818 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4213,7 +4213,7 @@ load_path_check (Lisp_Object lpath)
4213 if (STRINGP (dirfile)) 4213 if (STRINGP (dirfile))
4214 { 4214 {
4215 dirfile = Fdirectory_file_name (dirfile); 4215 dirfile = Fdirectory_file_name (dirfile);
4216 if (! file_accessible_directory_p (SSDATA (dirfile))) 4216 if (! file_accessible_directory_p (dirfile))
4217 dir_warning ("Lisp directory", XCAR (path_tail)); 4217 dir_warning ("Lisp directory", XCAR (path_tail));
4218 } 4218 }
4219 } 4219 }