diff options
author | Julian Andres Klode <jak@debian.org> | 2017-07-12 14:07:27 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-07-12 14:07:27 +0200 |
commit | 51da6127d0073c9fc81f4b220f2360bd612ded5c (patch) | |
tree | 8f98ae509d84c48a3c47b19ef450a1347244583f /apt-pkg/cacheiterators.h | |
parent | 87274d0f22e1dfd99b2e5200e2fe75c1b804eac3 (diff) |
cacheiterators: Warn about direct include and don't include pkgcache.h
This adds a warning so existing working code will still
work (as it includes pkgcache.h first anyway), but it will
know that it's not right to include this file directly.
Diffstat (limited to 'apt-pkg/cacheiterators.h')
-rw-r--r-- | apt-pkg/cacheiterators.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index fdc7fbc07..0cb684382 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -29,8 +29,10 @@ /*}}}*/ #ifndef PKGLIB_CACHEITERATORS_H #define PKGLIB_CACHEITERATORS_H +#ifndef __PKGLIB_IN_PKGCACHE_H +#warning apt-pkg/cacheiterators.h should not be included directly, include apt-pkg/pkgcache.h instead +#endif #include <apt-pkg/macros.h> -#include <apt-pkg/pkgcache.h> #include <iosfwd> #include <iterator> |