Rename basic-forward.h, sd-forward.h, and shared-forward.h to forward.h
Follow-up for 74d392ed1b.
This commit is contained in:
@@ -302,9 +302,9 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
inline functions that require the full definition of a struct into the
|
||||
implementation file so that only a forward declaration of the struct is
|
||||
required and not the full definition.
|
||||
- `src/basic/basic-forward.h` contains forward declarations for common types.
|
||||
If possible, only include `basic-forward.h` in header files which makes
|
||||
circular header dependencies a non-issue.
|
||||
- `src/basic/forward.h` contains forward declarations for common types. If
|
||||
possible, only include `forward.h` in header files which makes circular
|
||||
header dependencies a non-issue.
|
||||
|
||||
Bad:
|
||||
|
||||
@@ -382,10 +382,9 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
For common code, there are three different forward declaration headers:
|
||||
|
||||
- `src/basic`: `basic-forward.h`
|
||||
- `src/libsystemd`: `sd-forward.h`
|
||||
- `src/libsystemd-network`: `sd-forward.h`
|
||||
- `src/shared`: `shared-forward.h`
|
||||
- `src/basic/forward.h`
|
||||
- `src/libsystemd/forward.h`
|
||||
- `src/shared/forward.h`
|
||||
|
||||
Header files that extend other header files can include the original header
|
||||
file. For example, `iovec-util.h` includes `sys/uio.h`. To identify headers
|
||||
@@ -412,7 +411,7 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
```c
|
||||
// source.h
|
||||
|
||||
#include "basic-forward.h"
|
||||
#include "forward.h"
|
||||
|
||||
void my_function_that_logs(size_t sz);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user