From 3973eb1a7833ac3e96ff7738ef72b6bd6ce42685 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Sun, 1 Mar 2020 14:34:09 +0100 Subject: [PATCH] Enable C++ support for socket debug transport --- examples/debug-trans-socket/duk_trans_socket.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/debug-trans-socket/duk_trans_socket.h b/examples/debug-trans-socket/duk_trans_socket.h index 281ddc81..4671a1dd 100644 --- a/examples/debug-trans-socket/duk_trans_socket.h +++ b/examples/debug-trans-socket/duk_trans_socket.h @@ -3,6 +3,10 @@ #include "duktape.h" +#if defined(__cplusplus) +extern "C" { +#endif + void duk_trans_socket_init(void); void duk_trans_socket_finish(void); void duk_trans_socket_waitconn(void); @@ -12,4 +16,8 @@ duk_size_t duk_trans_socket_peek_cb(void *udata); void duk_trans_socket_read_flush_cb(void *udata); void duk_trans_socket_write_flush_cb(void *udata); +#if defined(__cplusplus) +} +#endif /* end 'extern "C"' wrapper */ + #endif /* DUK_TRANS_SOCKET_H_INCLUDED */