aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2015-01-14 00:42:15 -0800
committerPaul Eggert2015-01-14 00:42:48 -0800
commitd4b352af3e7d5c1afc719fb1f8c7c578642d8250 (patch)
tree0d6db56b3f30c316af5791c1944ee1c3c5736f64 /src
parentd7e26b44109f4068d41a075fa89d11c1a8156f66 (diff)
downloademacs-d4b352af3e7d5c1afc719fb1f8c7c578642d8250.tar.gz
emacs-d4b352af3e7d5c1afc719fb1f8c7c578642d8250.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/process.c12
-rw-r--r--src/process.h13
3 files changed, 19 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 12678166317..3523ea41570 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12015-01-14 Paul Eggert <eggert@cs.ucla.edu>
2
3 remove_slash_colon need not be inline
4 * process.c, process.h (remove_slash_colon): No longer inline.
5 This saves text bytes without hurting runtime performance.
6
12015-01-14 Dmitry Antipov <dmantipov@yandex.ru> 72015-01-14 Dmitry Antipov <dmantipov@yandex.ru>
2 8
3 Avoid extra multibyteness check in ENCODE_FILE users. 9 Avoid extra multibyteness check in ENCODE_FILE users.
diff --git a/src/process.c b/src/process.c
index 166bf851a8e..77c94f29211 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3827,6 +3827,18 @@ Data that is unavailable is returned as nil. */)
3827#endif 3827#endif
3828} 3828}
3829 3829
3830/* If program file NAME starts with /: for quoting a magic
3831 name, remove that, preserving the multibyteness of NAME. */
3832
3833Lisp_Object
3834remove_slash_colon (Lisp_Object name)
3835{
3836 return
3837 ((SBYTES (name) > 2 && SREF (name, 0) == '/' && SREF (name, 1) == ':')
3838 ? make_specified_string (SSDATA (name) + 2, SCHARS (name) - 2,
3839 SBYTES (name) - 2, STRING_MULTIBYTE (name))
3840 : name);
3841}
3830 3842
3831/* Turn off input and output for process PROC. */ 3843/* Turn off input and output for process PROC. */
3832 3844
diff --git a/src/process.h b/src/process.h
index 58b1daecfe6..36979dcac9e 100644
--- a/src/process.h
+++ b/src/process.h
@@ -237,17 +237,6 @@ extern Lisp_Object network_interface_list (void);
237extern Lisp_Object network_interface_info (Lisp_Object); 237extern Lisp_Object network_interface_info (Lisp_Object);
238#endif 238#endif
239 239
240/* If program file NAME starts with /: for quoting a magic 240extern Lisp_Object remove_slash_colon (Lisp_Object);
241 name, remove that, preserving the multibyteness of NAME. */
242
243INLINE Lisp_Object
244remove_slash_colon (Lisp_Object name)
245{
246 return
247 ((SBYTES (name) > 2 && SREF (name, 0) == '/' && SREF (name, 1) == ':')
248 ? make_specified_string (SSDATA (name) + 2, SCHARS (name) - 2,
249 SBYTES (name) - 2, STRING_MULTIBYTE (name))
250 : name);
251}
252 241
253INLINE_HEADER_END 242INLINE_HEADER_END