Skip to content

Commit fd05cc1

Browse files
authored
remove useless header files (swoole#4180)
* remove useless header files * fix tests
1 parent 0a3be1a commit fd05cc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+18
-121
lines changed

examples/cpp/test_server.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ int my_onReceive(swServer *serv, swRecvData *req) {
9797

9898
g_receive_count++;
9999

100-
swConnection *conn = serv->get_connection_by_session_id(req->info.fd);
100+
Connection *conn = serv->get_connection_by_session_id(req->info.fd);
101101

102102
memcpy(req_data, req->data, req->info.len);
103103
swoole::rtrim(req_data, req->info.len);

ext-src/php_swoole.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@
2323
#include "zend_exceptions.h"
2424

2525
BEGIN_EXTERN_C()
26-
#include "ext/standard/php_var.h"
2726
#ifdef SW_USE_JSON
2827
#include "ext/json/php_json.h"
2928
#endif
3029
END_EXTERN_C()
3130

3231
#include "swoole_mime_type.h"
3332
#include "swoole_server.h"
34-
#include "swoole_client.h"
3533
#include "swoole_util.h"
3634

3735
#include <netinet/in.h>

ext-src/swoole_async_coro.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
*/
1616

1717
#include "php_swoole_cxx.h"
18-
#include "php_streams.h"
19-
#include "php_network.h"
20-
21-
#include "ext/standard/file.h"
22-
#include "ext/standard/basic_functions.h"
18+
#include "swoole_socket.h"
2319

2420
#include <string>
2521
#include <vector>

ext-src/swoole_client.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ using swoole::Socks5Proxy;
2929
using swoole::HttpProxy;
3030
using swoole::String;
3131

32-
#include "ext/standard/basic_functions.h"
33-
3432
struct ClientCallback {
3533
zend_fcall_info_cache cache_onConnect;
3634
zend_fcall_info_cache cache_onReceive;

ext-src/swoole_client_coro.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
#include "swoole_socket.h"
2020
#include "swoole_protocol.h"
2121
#include "swoole_proxy.h"
22-
#include "swoole_mqtt.h"
23-
24-
#include "ext/standard/basic_functions.h"
2522

2623
using swoole::coroutine::Socket;
2724
using swoole::network::Address;

ext-src/swoole_http2_client_coro.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
#include "php_swoole_cxx.h"
1818
#include "php_swoole_http.h"
1919

20+
#include "swoole_string.h"
21+
#include "swoole_protocol.h"
22+
#include "swoole_socket.h"
2023
#include "swoole_util.h"
2124

2225
#ifdef SW_USE_HTTP2
2326

24-
#include "swoole_http.h"
2527
#include "swoole_http2.h"
2628

2729
#define HTTP2_CLIENT_HOST_HEADER_INDEX 3
2830

29-
#include <vector>
30-
3131
using namespace swoole;
3232
using swoole::coroutine::Socket;
3333

ext-src/swoole_http2_server.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
#include "main/php_variables.h"
2424

25-
#include <vector>
26-
2725
using namespace swoole;
2826
using std::string;
2927
using swoole::coroutine::System;
@@ -954,7 +952,7 @@ int swoole_http2_server_parse(Http2Session *client, const char *buf) {
954952
client->send_window += value;
955953
} else if (client->streams.find(stream_id) != client->streams.end()) {
956954
stream = client->streams[stream_id];
957-
Server *serv = (swServer *) stream->ctx->private_data;
955+
Server *serv = (Server *) stream->ctx->private_data;
958956

959957
stream->send_window += value;
960958
if (serv->send_yield && stream->waiting_coroutine) {

ext-src/swoole_http_client_coro.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "php_swoole_http.h"
2222

2323
#include "swoole_string.h"
24+
#include "swoole_protocol.h"
2425
#include "swoole_file.h"
2526
#include "swoole_util.h"
2627
#include "swoole_websocket.h"
@@ -32,8 +33,6 @@ SW_EXTERN_C_BEGIN
3233

3334
#include "thirdparty/swoole_http_parser.h"
3435

35-
#include "ext/standard/basic_functions.h"
36-
#include "ext/standard/php_http.h"
3736
#include "ext/standard/base64.h"
3837

3938
#ifdef SW_HAVE_ZLIB

ext-src/swoole_http_request.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,10 @@
1818

1919
SW_EXTERN_C_BEGIN
2020
#include "ext/standard/url.h"
21-
#include "ext/standard/sha1.h"
22-
#include "ext/standard/php_var.h"
23-
#include "ext/standard/php_string.h"
24-
#include "ext/standard/php_math.h"
25-
#include "ext/standard/php_array.h"
26-
#include "ext/date/php_date.h"
27-
#include "ext/standard/md5.h"
2821
SW_EXTERN_C_END
2922

30-
#include "main/rfc1867.h"
3123
#include "main/php_variables.h"
3224

33-
#include "swoole_base64.h"
34-
3525
#ifdef SW_HAVE_ZLIB
3626
#include <zlib.h>
3727
#endif

ext-src/swoole_http_response.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@
1616

1717
#include "php_swoole_http_server.h"
1818

19-
extern "C" {
20-
#include "ext/standard/url.h"
21-
#include "ext/standard/sha1.h"
22-
#include "ext/standard/php_var.h"
23-
#include "ext/standard/php_string.h"
24-
#include "ext/standard/php_math.h"
25-
#include "ext/standard/php_array.h"
26-
#include "ext/date/php_date.h"
27-
#include "ext/standard/md5.h"
28-
}
29-
30-
#include "swoole_base64.h"
3119
#include "swoole_util.h"
3220

3321
#ifdef SW_HAVE_ZLIB

0 commit comments

Comments
 (0)