From 778f5fcb676ea0218c49f6e5b3bcefe3583a6bf3 Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Wed, 13 Sep 2023 15:48:45 -0700 Subject: [PATCH] Document the policy on internal.h vs. avif.h --- include/avif/internal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/avif/internal.h b/include/avif/internal.h index 64b9696e45..1ec4124c6c 100644 --- a/include/avif/internal.h +++ b/include/avif/internal.h @@ -1,6 +1,18 @@ // Copyright 2019 Joe Drago. All rights reserved. // SPDX-License-Identifier: BSD-2-Clause +// Policy on including "avif/internal.h" vs. "avif/avif.h" +// +// "avif/avif.h" is the public header of the libavif library. Code that uses +// only the public API of the libavif library should include "avif/avif.h". +// +// "avif/internal.h" is the internal header of the libavif library. Code that +// uses the internal types or functions of the libavif library, such as the +// implementation files src/*.c and the unit tests of internal functions, +// should include "avif/internal.h". A file should not include both +// "avif/internal.h" and "avif/avif.h". An IWYU pragma has been added to tell +// the include-what-you-use tool that "avif/internal.h" exports "avif/avif.h". + #ifndef AVIF_INTERNAL_H #define AVIF_INTERNAL_H