aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/salticidae/msg.h')
-rw-r--r--include/salticidae/msg.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/salticidae/msg.h b/include/salticidae/msg.h
index 6964ab2..c88d70b 100644
--- a/include/salticidae/msg.h
+++ b/include/salticidae/msg.h
@@ -25,16 +25,17 @@
#ifndef _SALTICIDAE_MSG_H
#define _SALTICIDAE_MSG_H
-#include <cstdint>
-#include <cstring>
-#include <string>
-#include <vector>
-
#include "salticidae/type.h"
#include "salticidae/stream.h"
#include "salticidae/netaddr.h"
#ifdef __cplusplus
+
+#include <cstdint>
+#include <cstring>
+#include <string>
+#include <vector>
+
namespace salticidae {
template<typename OpcodeType>
@@ -280,14 +281,18 @@ typedef struct msg_t msg_t;
#endif
#ifdef SALTICIDAE_CBINDINGS
+#ifdef __cplusplus
extern "C" {
+#endif
msg_t *msg_new(_opcode_t opcode, bytearray_t *_moved_payload);
-datastream_t *msg_get_payload(msg_t *msg);
-const _opcode_t &msg_get_opcode(const msg_t *msg);
+datastream_t *msg_get_payload(const msg_t *msg);
+const _opcode_t msg_get_opcode(const msg_t *msg);
void msg_free(msg_t *msg);
+#ifdef __cplusplus
}
#endif
+#endif
#endif