diff options
| author | Stefan Monnier | 2011-02-18 12:37:30 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2011-02-18 12:37:30 -0500 |
| commit | cbe81f1d96ca482c15d583cfd4a196d38af87972 (patch) | |
| tree | 8f0bbba3d3d444ea812d696e3d4cb45eb1543486 /src | |
| parent | aa56f3613e788df186bef09e2b5414428140377a (diff) | |
| download | emacs-cbe81f1d96ca482c15d583cfd4a196d38af87972.tar.gz emacs-cbe81f1d96ca482c15d583cfd4a196d38af87972.zip | |
* alloc.c (make_unibyte_string): Don't SET_UNIBYTE redundantly.
* process.c (Fstart_process, Fmake_serial_process)
(Fmake_network_process, server_accept_connection):
Use empty_unibyte_string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/alloc.c | 1 | ||||
| -rw-r--r-- | src/process.c | 16 |
3 files changed, 14 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9839c7fcc98..dea7b2547fd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2011-02-18 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2011-02-18 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * process.c (Fstart_process, Fmake_serial_process) | ||
| 4 | (Fmake_network_process, server_accept_connection): | ||
| 5 | Use empty_unibyte_string. | ||
| 6 | |||
| 7 | * alloc.c (make_unibyte_string): Don't SET_UNIBYTE redundantly. | ||
| 8 | |||
| 3 | * lread.c (Qdir_ok): New constant. | 9 | * lread.c (Qdir_ok): New constant. |
| 4 | (syms_of_lread): Initialize it. | 10 | (syms_of_lread): Initialize it. |
| 5 | (openp): Don't ignore directories if the predicate returns dir-ok. | 11 | (openp): Don't ignore directories if the predicate returns dir-ok. |
diff --git a/src/alloc.c b/src/alloc.c index e8b8f45e9b1..d7006ca6bfd 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2301,7 +2301,6 @@ make_unibyte_string (const char *contents, EMACS_INT length) | |||
| 2301 | register Lisp_Object val; | 2301 | register Lisp_Object val; |
| 2302 | val = make_uninit_string (length); | 2302 | val = make_uninit_string (length); |
| 2303 | memcpy (SDATA (val), contents, length); | 2303 | memcpy (SDATA (val), contents, length); |
| 2304 | STRING_SET_UNIBYTE (val); | ||
| 2305 | return val; | 2304 | return val; |
| 2306 | } | 2305 | } |
| 2307 | 2306 | ||
diff --git a/src/process.c b/src/process.c index 4a145f7376a..210287a85f1 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1660,9 +1660,9 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1660 | } | 1660 | } |
| 1661 | 1661 | ||
| 1662 | 1662 | ||
| 1663 | XPROCESS (proc)->decoding_buf = make_uninit_string (0); | 1663 | XPROCESS (proc)->decoding_buf = empty_unibyte_string; |
| 1664 | XPROCESS (proc)->decoding_carryover = 0; | 1664 | XPROCESS (proc)->decoding_carryover = 0; |
| 1665 | XPROCESS (proc)->encoding_buf = make_uninit_string (0); | 1665 | XPROCESS (proc)->encoding_buf = empty_unibyte_string; |
| 1666 | 1666 | ||
| 1667 | XPROCESS (proc)->inherit_coding_system_flag | 1667 | XPROCESS (proc)->inherit_coding_system_flag |
| 1668 | = !(NILP (buffer) || !inherit_process_coding_system); | 1668 | = !(NILP (buffer) || !inherit_process_coding_system); |
| @@ -2918,9 +2918,9 @@ usage: (make-serial-process &rest ARGS) */) | |||
| 2918 | p->encode_coding_system = val; | 2918 | p->encode_coding_system = val; |
| 2919 | 2919 | ||
| 2920 | setup_process_coding_systems (proc); | 2920 | setup_process_coding_systems (proc); |
| 2921 | p->decoding_buf = make_uninit_string (0); | 2921 | p->decoding_buf = empty_unibyte_string; |
| 2922 | p->decoding_carryover = 0; | 2922 | p->decoding_carryover = 0; |
| 2923 | p->encoding_buf = make_uninit_string (0); | 2923 | p->encoding_buf = empty_unibyte_string; |
| 2924 | p->inherit_coding_system_flag | 2924 | p->inherit_coding_system_flag |
| 2925 | = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); | 2925 | = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); |
| 2926 | 2926 | ||
| @@ -3787,9 +3787,9 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3787 | } | 3787 | } |
| 3788 | setup_process_coding_systems (proc); | 3788 | setup_process_coding_systems (proc); |
| 3789 | 3789 | ||
| 3790 | p->decoding_buf = make_uninit_string (0); | 3790 | p->decoding_buf = empty_unibyte_string; |
| 3791 | p->decoding_carryover = 0; | 3791 | p->decoding_carryover = 0; |
| 3792 | p->encoding_buf = make_uninit_string (0); | 3792 | p->encoding_buf = empty_unibyte_string; |
| 3793 | 3793 | ||
| 3794 | p->inherit_coding_system_flag | 3794 | p->inherit_coding_system_flag |
| 3795 | = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); | 3795 | = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); |
| @@ -4364,9 +4364,9 @@ server_accept_connection (Lisp_Object server, int channel) | |||
| 4364 | p->encode_coding_system = ps->encode_coding_system; | 4364 | p->encode_coding_system = ps->encode_coding_system; |
| 4365 | setup_process_coding_systems (proc); | 4365 | setup_process_coding_systems (proc); |
| 4366 | 4366 | ||
| 4367 | p->decoding_buf = make_uninit_string (0); | 4367 | p->decoding_buf = empty_unibyte_string; |
| 4368 | p->decoding_carryover = 0; | 4368 | p->decoding_carryover = 0; |
| 4369 | p->encoding_buf = make_uninit_string (0); | 4369 | p->encoding_buf = empty_unibyte_string; |
| 4370 | 4370 | ||
| 4371 | p->inherit_coding_system_flag | 4371 | p->inherit_coding_system_flag |
| 4372 | = (NILP (buffer) ? 0 : ps->inherit_coding_system_flag); | 4372 | = (NILP (buffer) ? 0 : ps->inherit_coding_system_flag); |