summaryrefslogtreecommitdiff
path: root/gi/fundamental.h
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2019-05-31 23:40:53 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2019-06-08 23:11:29 -0700
commit01920362be26a2cb4e38b55cc211351391885d1d (patch)
treee82cc9c7af565610eb756ea5a561dbd83359d9a0 /gi/fundamental.h
parente9d108c4a67a45bc2caf5429736f164956f6c9dc (diff)
downloadgjs-01920362be26a2cb4e38b55cc211351391885d1d.tar.gz
maint: Fix header includes once and for all
Previously #include statements were a bit of a mess across the codebase. This commit is the result of a pass by the IWYU (Include What You Use) tool, which suggests headers to add or remove based on what is in the file, and can also suggest forward-declaring classes instead of including their headers, if they are only used as a pointer in a particular file. Cleaning this up should in general speed up compile times. IWYU isn't perfect, it produces a number of false positives, so we don't try to automate this process and we don't accept all of its recommendations. We do add a script and configuration file to the tools/ directory so that IWYU can be every so often in the future. We also clean up all the includes according to a consistent style, which is now described clearly in the C++ style guide.
Diffstat (limited to 'gi/fundamental.h')
-rw-r--r--gi/fundamental.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gi/fundamental.h b/gi/fundamental.h
index aea7e35a..9756aaf2 100644
--- a/gi/fundamental.h
+++ b/gi/fundamental.h
@@ -25,13 +25,14 @@
#ifndef GI_FUNDAMENTAL_H_
#define GI_FUNDAMENTAL_H_
-#include <stdbool.h>
-#include <glib.h>
#include <girepository.h>
+#include <glib-object.h>
+
+#include "gjs/jsapi-wrapper.h"
#include "gi/wrapperutils.h"
-#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
+#include "util/log.h"
class FundamentalPrototype;
class FundamentalInstance;