From 4d27dc49ac1eff6ca98e00246d672f02f0442da2 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Tue, 5 Dec 2017 16:15:55 +0800 Subject: [PATCH] Optimize code Signed-off-by: Jianhui Zhao --- src/uhttp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uhttp.c b/src/uhttp.c index ccb98c4..f23d65e 100755 --- a/src/uhttp.c +++ b/src/uhttp.c @@ -567,12 +567,12 @@ void uh_register_default_hook(struct uh_server *srv, uh_hookfn_t cb) srv->default_cb = cb; } -enum http_method uh_get_method(struct uh_connection *con) +inline enum http_method uh_get_method(struct uh_connection *con) { return con->parser.method; } -const char *uh_get_method_str(struct uh_connection *con) +inline const char *uh_get_method_str(struct uh_connection *con) { return http_method_str(con->parser.method); } @@ -592,7 +592,7 @@ inline struct uh_str *uh_get_query(struct uh_connection *con) return &con->req.query; } -int uh_get_con_sock(struct uh_connection *con) +inline int uh_get_con_sock(struct uh_connection *con) { return con->sock; }