From 8b20f8989f6e2c69fd34fd6e7faf8d15042000fd Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Sat, 5 Mar 2016 02:27:31 +0200 Subject: [PATCH] [core] added inline function to get link from msg; --- include/sxmp/sxmp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/sxmp/sxmp.h b/include/sxmp/sxmp.h index ea63a03..48cc6bc 100644 --- a/include/sxmp/sxmp.h +++ b/include/sxmp/sxmp.h @@ -161,6 +161,16 @@ typedef struct __sxmsg_t { #define sxmsg_waitlock(m) pthread_mutex_lock(&((m)->wait)) #define sxmsg_waitunlock(m) pthread_mutex_unlock(&((m)->wait)) +#ifdef __cplusplus +extern "C" { +#endif + static inline sxlink_t *sxmsg_link(sxmsg_t *msg) { + return msg->pch->link; + } +#ifdef __cplusplus +} +#endif + typedef struct __link_rpc_entry_type { char *name; int (*rpcf)(void *, sexp_t *);