1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-01 20:06:00 +00:00

remove_slash_colon need not be inline

* process.c, process.h (remove_slash_colon): No longer inline.
This saves text bytes without hurting runtime performance.
This commit is contained in:
Paul Eggert 2015-01-14 00:42:15 -08:00
parent d7e26b4410
commit d4b352af3e
3 changed files with 19 additions and 12 deletions

View File

@ -1,3 +1,9 @@
2015-01-14 Paul Eggert <eggert@cs.ucla.edu>
remove_slash_colon need not be inline
* process.c, process.h (remove_slash_colon): No longer inline.
This saves text bytes without hurting runtime performance.
2015-01-14 Dmitry Antipov <dmantipov@yandex.ru>
Avoid extra multibyteness check in ENCODE_FILE users.

View File

@ -3827,6 +3827,18 @@ Data that is unavailable is returned as nil. */)
#endif
}
/* If program file NAME starts with /: for quoting a magic
name, remove that, preserving the multibyteness of NAME. */
Lisp_Object
remove_slash_colon (Lisp_Object name)
{
return
((SBYTES (name) > 2 && SREF (name, 0) == '/' && SREF (name, 1) == ':')
? make_specified_string (SSDATA (name) + 2, SCHARS (name) - 2,
SBYTES (name) - 2, STRING_MULTIBYTE (name))
: name);
}
/* Turn off input and output for process PROC. */

View File

@ -237,17 +237,6 @@ extern Lisp_Object network_interface_list (void);
extern Lisp_Object network_interface_info (Lisp_Object);
#endif
/* If program file NAME starts with /: for quoting a magic
name, remove that, preserving the multibyteness of NAME. */
INLINE Lisp_Object
remove_slash_colon (Lisp_Object name)
{
return
((SBYTES (name) > 2 && SREF (name, 0) == '/' && SREF (name, 1) == ':')
? make_specified_string (SSDATA (name) + 2, SCHARS (name) - 2,
SBYTES (name) - 2, STRING_MULTIBYTE (name))
: name);
}
extern Lisp_Object remove_slash_colon (Lisp_Object);
INLINE_HEADER_END