From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: vdavydov.dev@gmail.com
Subject: [PATCH 05/11] sio: turn into C
Date: Fri, 30 Nov 2018 18:39:37 +0300 [thread overview]
Message-ID: <89dc2904293e9c586e572cbebd08b14ad90fd91b.1543590433.git.v.shpilevoy@tarantool.org> (raw)
In-Reply-To: <cover.1543590433.git.v.shpilevoy@tarantool.org>
In-Reply-To: <cover.1543590433.git.v.shpilevoy@tarantool.org>
---
src/CMakeLists.txt | 2 +-
src/exception.h | 2 +-
src/{sio.cc => sio.c} | 0
src/sio.h | 5 ++---
4 files changed, 4 insertions(+), 5 deletions(-)
rename src/{sio.cc => sio.c} (100%)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7d0734f55..77353b244 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -88,7 +88,7 @@ set (core_sources
fiber_cond.c
fiber_channel.c
latch.c
- sio.cc
+ sio.c
evio.cc
coio.cc
coio_task.c
diff --git a/src/exception.h b/src/exception.h
index f08d946b5..e680e40af 100644
--- a/src/exception.h
+++ b/src/exception.h
@@ -50,6 +50,7 @@ extern const struct type_info type_LuajitError;
extern const struct type_info type_IllegalParams;
extern const struct type_info type_SystemError;
extern const struct type_info type_CollationError;
+extern const struct type_info type_SocketError;
const char *
exception_get_string(struct error *e, const struct method_info *method);
@@ -97,7 +98,6 @@ protected:
int m_errno;
};
-extern const struct type_info type_SocketError;
class SocketError: public SystemError {
public:
SocketError(const char *file, unsigned line, const char *socketname,
diff --git a/src/sio.cc b/src/sio.c
similarity index 100%
rename from src/sio.cc
rename to src/sio.c
diff --git a/src/sio.h b/src/sio.h
index ff383aa36..1978ca56d 100644
--- a/src/sio.h
+++ b/src/sio.h
@@ -90,9 +90,6 @@ sio_add_to_iov(struct iovec *iov, ssize_t size)
iov->iov_base = (char *) iov->iov_base - size;
}
-#if defined(__cplusplus)
-} /* extern "C" */
-
/** Pretty format socket name and peer. */
const char *
sio_socketname(int fd);
@@ -256,6 +253,8 @@ sio_recvfrom(int fd, void *buf, size_t len, int flags,
struct sockaddr *src_addr, socklen_t *addrlen,
bool *is_error_fatal);
+#if defined(__cplusplus)
+} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif /* TARANTOOL_SIO_H_INCLUDED */
--
2.17.2 (Apple Git-113)
next prev parent reply other threads:[~2018-11-30 15:39 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 15:39 [PATCH 00/11] SWIM preparation Vladislav Shpilevoy
2018-11-30 15:39 ` [PATCH 01/11] box: move info_handler interface into src/info Vladislav Shpilevoy
2018-12-03 11:05 ` Vladimir Davydov
2018-12-03 21:48 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-03 20:41 ` [tarantool-patches] " Konstantin Osipov
2018-12-03 21:48 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-04 8:52 ` Vladimir Davydov
2018-11-30 15:39 ` [PATCH 10/11] evio: remove exceptions Vladislav Shpilevoy
2018-11-30 15:39 ` [PATCH 11/11] evio: turn into C Vladislav Shpilevoy
2018-11-30 15:39 ` [PATCH 02/11] sio: remove unused functions, restyle code Vladislav Shpilevoy
2018-12-03 12:28 ` Vladimir Davydov
2018-12-04 21:29 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-05 8:41 ` Vladimir Davydov
2018-11-30 15:39 ` [PATCH 03/11] sio: remove exceptions Vladislav Shpilevoy
2018-12-03 12:36 ` Vladimir Davydov
2018-12-04 21:29 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-05 8:42 ` Vladimir Davydov
2018-11-30 15:39 ` [PATCH 04/11] sio: fix passing negative size_t to sio_add_to_iov Vladislav Shpilevoy
2018-12-03 13:50 ` Vladimir Davydov
2018-12-04 21:29 ` Vladislav Shpilevoy
2018-12-05 8:48 ` Vladimir Davydov
2018-11-30 15:39 ` Vladislav Shpilevoy [this message]
2018-11-30 15:39 ` [PATCH 06/11] evio: make on_accept be nothrow Vladislav Shpilevoy
2018-12-03 14:58 ` Vladimir Davydov
2018-12-04 21:29 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-05 8:52 ` Vladimir Davydov
2018-11-30 15:39 ` [PATCH 07/11] coio: fix file descriptor leak on accept Vladislav Shpilevoy
2018-12-03 16:16 ` Vladimir Davydov
2018-12-04 21:29 ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-30 15:39 ` [PATCH 08/11] coio: fix double close of a file descriptor Vladislav Shpilevoy
2018-12-03 16:19 ` Vladimir Davydov
2018-12-04 21:29 ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-30 15:39 ` [PATCH 09/11] evio: refactoring Vladislav Shpilevoy
2018-12-03 16:37 ` Vladimir Davydov
2018-12-04 21:29 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-03 9:47 ` [PATCH 00/11] SWIM preparation Vladimir Davydov
2018-12-03 10:27 ` [tarantool-patches] " Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=89dc2904293e9c586e572cbebd08b14ad90fd91b.1543590433.git.v.shpilevoy@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [PATCH 05/11] sio: turn into C' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox