Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: kostja@tarantool.org
Subject: [tarantool-patches] [PATCH v2 2/4] Move 'http_parser' to src/lib
Date: Tue, 26 Feb 2019 15:11:34 +0300	[thread overview]
Message-ID: <e924abb680c1d5f386677e28d545cd00b0b37506.1551182934.git.v.shpilevoy@tarantool.org> (raw)
In-Reply-To: <cover.1551182934.git.v.shpilevoy@tarantool.org>
In-Reply-To: <cover.1551182934.git.v.shpilevoy@tarantool.org>

Http_parser in fact does not depend on anything, even on the core.
As a rule, such basic libraries are stored in src/lib.

The patch is not necessary for anything, but it is a right thing
to do, while some activity is happening there.
---
 src/CMakeLists.txt                      | 3 +--
 src/lib/CMakeLists.txt                  | 1 +
 src/lib/http_parser/CMakeLists.txt      | 1 +
 src/{ => lib/http_parser}/http_parser.c | 0
 src/{ => lib/http_parser}/http_parser.h | 0
 src/lua/httpc.c                         | 2 +-
 6 files changed, 4 insertions(+), 3 deletions(-)
 create mode 100644 src/lib/http_parser/CMakeLists.txt
 rename src/{ => lib/http_parser}/http_parser.c (100%)
 rename src/{ => lib/http_parser}/http_parser.h (100%)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1abde73b3..3d8d6413c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -100,7 +100,6 @@ set (core_sources
      util.c
      random.c
      trigger.cc
-     http_parser.c
      coll.c
      coll_def.c
      mpstream.c
@@ -219,7 +218,7 @@ endif()
 
 set_source_files_compile_flags(${server_sources})
 add_library(server STATIC ${server_sources})
-target_link_libraries(server core bit uri uuid ${ICU_LIBRARIES})
+target_link_libraries(server core http_parser bit uri uuid ${ICU_LIBRARIES})
 
 # Rule of thumb: if exporting a symbol from a static library, list the
 # library here.
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index e06934486..e06d35bf0 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -6,6 +6,7 @@ add_subdirectory(salad)
 add_subdirectory(csv)
 add_subdirectory(json)
 add_subdirectory(uri)
+add_subdirectory(http_parser)
 if(ENABLE_BUNDLED_MSGPUCK)
     add_subdirectory(msgpuck EXCLUDE_FROM_ALL)
 endif()
diff --git a/src/lib/http_parser/CMakeLists.txt b/src/lib/http_parser/CMakeLists.txt
new file mode 100644
index 000000000..a48f83cb6
--- /dev/null
+++ b/src/lib/http_parser/CMakeLists.txt
@@ -0,0 +1 @@
+add_library(http_parser STATIC http_parser.c)
diff --git a/src/http_parser.c b/src/lib/http_parser/http_parser.c
similarity index 100%
rename from src/http_parser.c
rename to src/lib/http_parser/http_parser.c
diff --git a/src/http_parser.h b/src/lib/http_parser/http_parser.h
similarity index 100%
rename from src/http_parser.h
rename to src/lib/http_parser/http_parser.h
diff --git a/src/lua/httpc.c b/src/lua/httpc.c
index d31e664d6..976b2d4cf 100644
--- a/src/lua/httpc.c
+++ b/src/lua/httpc.c
@@ -34,7 +34,7 @@
  */
 #define DRIVER_LUA_UDATA_NAME	"httpc"
 
-#include <http_parser.h>
+#include "http_parser/http_parser.h"
 #include "src/httpc.h"
 #include "say.h"
 #include "lua/utils.h"
-- 
2.17.2 (Apple Git-113)

  parent reply	other threads:[~2019-02-26 12:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 12:11 [tarantool-patches] [PATCH v2 0/4] Move 'core' lib " Vladislav Shpilevoy
2019-02-26 12:11 ` [tarantool-patches] [PATCH v2 1/4] Remove dead dependency of http_parser on httpc Vladislav Shpilevoy
2019-02-26 12:12   ` [tarantool-patches] " Vladislav Shpilevoy
2019-02-26 12:21   ` Konstantin Osipov
2019-02-26 12:11 ` Vladislav Shpilevoy [this message]
2019-02-26 12:21   ` [tarantool-patches] Re: [PATCH v2 2/4] Move 'http_parser' to src/lib Konstantin Osipov
2019-02-26 16:57     ` Vladislav Shpilevoy
2019-02-26 12:11 ` [tarantool-patches] [PATCH v2 3/4] Move 'core' and 'uuid' libs " Vladislav Shpilevoy
2019-02-26 12:22   ` [tarantool-patches] " Konstantin Osipov
2019-02-26 16:57     ` Vladislav Shpilevoy
2019-02-26 12:11 ` [tarantool-patches] [PATCH v2 4/4] Extract 'coll' library from 'core' Vladislav Shpilevoy
2019-02-26 12:23   ` [tarantool-patches] " Konstantin Osipov
2019-02-26 12:37     ` Vladislav Shpilevoy
2019-02-26 12:55       ` Konstantin Osipov
2019-02-26 13:09         ` Vladislav Shpilevoy
2019-02-26 13:17           ` Konstantin Osipov
2019-02-26 13:43             ` Vladislav Shpilevoy
2019-02-27 15:07               ` Vladislav Shpilevoy
2019-02-26 16:55 ` [tarantool-patches] [PATCH 1/1] Move 'info' library to src/lib Vladislav Shpilevoy
2019-02-26 22:08   ` [tarantool-patches] " Konstantin Osipov
2019-02-27 15:07     ` 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=e924abb680c1d5f386677e28d545cd00b0b37506.1551182934.git.v.shpilevoy@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH v2 2/4] Move '\''http_parser'\'' to src/lib' \
    /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