Commit 347f3cd3 authored by Andreas Schwab's avatar Andreas Schwab

Simplify last change.

parent b9607587
......@@ -5550,11 +5550,10 @@ send_process (proc, buf, len, object)
struct Lisp_Process *p = XPROCESS (proc);
int rv;
struct coding_system *coding;
struct gcpro gcpro1, gcpro2;
struct gcpro gcpro1;
SIGTYPE (*volatile old_sigpipe) ();
Lisp_Object dst_object = Qnil;
GCPRO2 (object, dst_object);
GCPRO1 (object);
if (p->raw_status_new)
update_status (p);
......@@ -5633,8 +5632,8 @@ send_process (proc, buf, len, object)
}
len = coding->produced;
dst_object = coding->dst_object;
buf = SDATA (dst_object);
object = coding->dst_object;
buf = SDATA (object);
}
if (pty_max_bytes == 0)
......@@ -5765,9 +5764,7 @@ send_process (proc, buf, len, object)
/* Running filters might relocate buffers or strings.
Arrange to relocate BUF. */
if (CODING_REQUIRE_ENCODING (coding))
offset = buf - SDATA (dst_object);
else if (BUFFERP (object))
if (BUFFERP (object))
offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf);
else if (STRINGP (object))
offset = buf - SDATA (object);
......@@ -5778,9 +5775,7 @@ send_process (proc, buf, len, object)
wait_reading_process_output (1, 0, 0, 0, Qnil, NULL, 0);
#endif
if (CODING_REQUIRE_ENCODING (coding))
buf = offset + SDATA (dst_object);
else if (BUFFERP (object))
if (BUFFERP (object))
buf = BUF_BYTE_ADDRESS (XBUFFER (object), offset);
else if (STRINGP (object))
buf = offset + SDATA (object);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment