[PATCH 11/11] evio: turn into C
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Fri Nov 30 18:39:33 MSK 2018
Evio now officially can be used from C code.
Needed for #3234
---
src/CMakeLists.txt | 2 +-
src/{evio.cc => evio.c} | 0
src/evio.h | 9 +++++++++
3 files changed, 10 insertions(+), 1 deletion(-)
rename src/{evio.cc => evio.c} (100%)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 77353b244..58031d671 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -89,7 +89,7 @@ set (core_sources
fiber_channel.c
latch.c
sio.c
- evio.cc
+ evio.c
coio.cc
coio_task.c
coio_file.c
diff --git a/src/evio.cc b/src/evio.c
similarity index 100%
rename from src/evio.cc
rename to src/evio.c
diff --git a/src/evio.h b/src/evio.h
index 1446a5617..574c1f807 100644
--- a/src/evio.h
+++ b/src/evio.h
@@ -38,6 +38,11 @@
#include "tarantool_ev.h"
#include "sio.h"
#include "uri.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif /* defined(__cplusplus) */
+
/**
* A way to add a socket to the event loop.
*
@@ -150,4 +155,8 @@ evio_timeout_update(ev_loop *loop, ev_tstamp start, ev_tstamp *delay)
int
evio_setsockopt_client(int fd, int family, int type);
+#if defined(__cplusplus)
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
#endif /* TARANTOOL_EVIO_H_INCLUDED */
--
2.17.2 (Apple Git-113)
More information about the Tarantool-patches
mailing list