From ea65f9503c80c33fb236703a7e81747bcb94666b Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 9 Oct 2025 19:24:37 -0700 Subject: header file refactoring for IWYU (protocols) This changes the header files mostly in the protocols to include directly rather than through the commmon nng_impl.h header. This should lead to faster compiles, and by properly making all includes relative should reduce friction with language servers and other tooling. --- src/sp/protocol/pipeline0/pull.c | 10 +++++++--- src/sp/protocol/pipeline0/pull_test.c | 3 +-- src/sp/protocol/pipeline0/push.c | 8 +++++++- src/sp/protocol/pipeline0/push_test.c | 3 +-- 4 files changed, 16 insertions(+), 8 deletions(-) (limited to 'src/sp/protocol/pipeline0') diff --git a/src/sp/protocol/pipeline0/pull.c b/src/sp/protocol/pipeline0/pull.c index 559935b0..f295556d 100644 --- a/src/sp/protocol/pipeline0/pull.c +++ b/src/sp/protocol/pipeline0/pull.c @@ -8,9 +8,13 @@ // found online at https://opensource.org/licenses/MIT. // -#include - -#include "core/nng_impl.h" +#include "../../../core/aio.h" +#include "../../../core/defs.h" +#include "../../../core/list.h" +#include "../../../core/message.h" +#include "../../../core/pipe.h" +#include "../../../core/pollable.h" +#include "../../../core/protocol.h" // Pull protocol. The PULL protocol is the "read" side of a pipeline. diff --git a/src/sp/protocol/pipeline0/pull_test.c b/src/sp/protocol/pipeline0/pull_test.c index 32134082..2f538093 100644 --- a/src/sp/protocol/pipeline0/pull_test.c +++ b/src/sp/protocol/pipeline0/pull_test.c @@ -7,8 +7,7 @@ // found online at https://opensource.org/licenses/MIT. // -#include "nng/nng.h" -#include +#include "../../../testing/nuts.h" static void test_pull_identity(void) diff --git a/src/sp/protocol/pipeline0/push.c b/src/sp/protocol/pipeline0/push.c index cd710480..3be746c9 100644 --- a/src/sp/protocol/pipeline0/push.c +++ b/src/sp/protocol/pipeline0/push.c @@ -10,7 +10,13 @@ #include -#include "core/nng_impl.h" +#include "../../../core/aio.h" +#include "../../../core/defs.h" +#include "../../../core/lmq.h" +#include "../../../core/message.h" +#include "../../../core/pipe.h" +#include "../../../core/pollable.h" +#include "../../../core/protocol.h" // Push protocol. The PUSH protocol is the "write" side of a pipeline. // Push distributes fairly, or tries to, by giving messages in round-robin diff --git a/src/sp/protocol/pipeline0/push_test.c b/src/sp/protocol/pipeline0/push_test.c index c2a99fb5..8e564215 100644 --- a/src/sp/protocol/pipeline0/push_test.c +++ b/src/sp/protocol/pipeline0/push_test.c @@ -7,8 +7,7 @@ // found online at https://opensource.org/licenses/MIT. // -#include "nng/nng.h" -#include +#include "../../../testing/nuts.h" static void test_push_identity(void) -- cgit v1.2.3-70-g09d2