diff options
| author | Paul Eggert | 2015-01-14 00:42:15 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-01-14 00:42:48 -0800 |
| commit | d4b352af3e7d5c1afc719fb1f8c7c578642d8250 (patch) | |
| tree | 0d6db56b3f30c316af5791c1944ee1c3c5736f64 /src | |
| parent | d7e26b44109f4068d41a075fa89d11c1a8156f66 (diff) | |
| download | emacs-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/ChangeLog | 6 | ||||
| -rw-r--r-- | src/process.c | 12 | ||||
| -rw-r--r-- | src/process.h | 13 |
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 @@ | |||
| 1 | 2015-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 | |||
| 1 | 2015-01-14 Dmitry Antipov <dmantipov@yandex.ru> | 7 | 2015-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 | |||
| 3833 | Lisp_Object | ||
| 3834 | remove_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); | |||
| 237 | extern Lisp_Object network_interface_info (Lisp_Object); | 237 | extern Lisp_Object network_interface_info (Lisp_Object); |
| 238 | #endif | 238 | #endif |
| 239 | 239 | ||
| 240 | /* If program file NAME starts with /: for quoting a magic | 240 | extern Lisp_Object remove_slash_colon (Lisp_Object); |
| 241 | name, remove that, preserving the multibyteness of NAME. */ | ||
| 242 | |||
| 243 | INLINE Lisp_Object | ||
| 244 | remove_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 | ||
| 253 | INLINE_HEADER_END | 242 | INLINE_HEADER_END |