Commit 6a09a33b authored by Paul Eggert's avatar Paul Eggert

* process.h (PSET): Remove.

Replace all uses with calls to new setter functions.
Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
(PROCESS_INLINE): New macro.
(pset_childp): New setter function.
(pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
* process.c (PROCESS_INLINE):
Define to EXTERN_INLINE, so that the corresponding functions
are compiled into code.
(pset_buffer, pset_command, pset_decode_coding_system)
(pset_decoding_buf, pset_encode_coding_system)
(pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
(pset_plist, pset_sentinel, pset_status, pset_tty_name)
(pset_type, pset_write_queue): New setter functions.

Fixes: debbugs:12215
parent e8c17b81
2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
* process.h (PSET): Remove (Bug#12215).
Replace all uses with calls to new setter functions.
Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
(PROCESS_INLINE): New macro.
(pset_childp): New setter function.
(pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
* process.c (PROCESS_INLINE):
Define to EXTERN_INLINE, so that the corresponding functions
are compiled into code.
(pset_buffer, pset_command, pset_decode_coding_system)
(pset_decoding_buf, pset_encode_coding_system)
(pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
(pset_plist, pset_sentinel, pset_status, pset_tty_name)
(pset_type, pset_write_queue): New setter functions.
* window.h (WSET): Remove (Bug#12215).
Replace all uses with calls to new setter functions.
Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
......
......@@ -830,7 +830,7 @@ one trustfile (usually a CA bundle). */)
XPROCESS (proc)->gnutls_state = NULL;
XPROCESS (proc)->gnutls_x509_cred = NULL;
XPROCESS (proc)->gnutls_anon_cred = NULL;
PSET (XPROCESS (proc), gnutls_cred_type, type);
pset_gnutls_cred_type (XPROCESS (proc), type);
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_EMPTY;
GNUTLS_LOG (1, max_log_level, "allocating credentials");
......
This diff is collapsed.
......@@ -26,10 +26,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "gnutls.h"
#endif
/* Most code should use these macros to set
Lisp fields in struct Lisp_Process. */
#define PSET(p, field, value) ((p)->field = (value))
INLINE_HEADER_BEGIN
#ifndef PROCESS_INLINE
# define PROCESS_INLINE INLINE
#endif
/* This structure records information about a subprocess
or network connection. */
......@@ -165,6 +165,23 @@ struct Lisp_Process
#define ChannelMask(n) (1 << (n))
/* Most code should use these functions to set Lisp fields in struct
process. */
PROCESS_INLINE void
pset_childp (struct Lisp_Process *p, Lisp_Object val)
{
p->childp = val;
}
#ifdef HAVE_GNUTLS
PROCESS_INLINE void
pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val)
{
p->gnutls_cred_type = val;
}
#endif
/* True if we are about to fork off a synchronous process or if we
are waiting for it. */
extern int synch_process_alive;
......@@ -208,3 +225,5 @@ extern void add_read_fd (int fd, fd_callback func, void *data);
extern void delete_read_fd (int fd);
extern void add_write_fd (int fd, fd_callback func, void *data);
extern void delete_write_fd (int fd);
INLINE_HEADER_END
......@@ -2307,8 +2307,7 @@ serial_configure (struct Lisp_Process *p,
error ("tcsetattr() failed: %s", emacs_strerror (errno));
childp2 = Fplist_put (childp2, QCsummary, build_string (summary));
PSET (p, childp, childp2);
pset_childp (p, childp2);
}
#endif /* not DOS_NT */
......
......@@ -7023,7 +7023,7 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
error ("SetCommState() failed");
childp2 = Fplist_put (childp2, QCsummary, build_string (summary));
PSET (p, childp, childp2);
pset_childp (p, childp2);
}
#ifdef HAVE_GNUTLS
......
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