[gjs: 8/18] build: Add global slot constants to IWYU mapping file



commit daaf5e86ec631d06ec6eabf57a62ccda16fa70e2
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Nov 23 23:17:44 2019 -0800

    build: Add global slot constants to IWYU mapping file
    
    These need to be included via jsapi-class.h, not global.h, and in newer
    versions of IWYU we can specify that in the mapping file.

 gi/wrapperutils.h          |  2 +-
 gjs/importer.cpp           |  1 -
 tools/gjs-private-iwyu.imp | 25 +++++++++++++++++++++++--
 3 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/gi/wrapperutils.h b/gi/wrapperutils.h
index 4b577ff7..6248bf09 100644
--- a/gi/wrapperutils.h
+++ b/gi/wrapperutils.h
@@ -38,7 +38,7 @@
 
 #include "gjs/atoms.h"
 #include "gjs/context-private.h"
-#include "gjs/jsapi-class.h"  // IWYU pragma: keep
+#include "gjs/jsapi-class.h"
 #include "gjs/jsapi-util.h"
 #include "gjs/macros.h"
 #include "util/log.h"
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 72e2cb61..300044e6 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -41,7 +41,6 @@
 
 #include "gjs/atoms.h"
 #include "gjs/context-private.h"
-#include "gjs/global.h"
 #include "gjs/importer.h"
 #include "gjs/jsapi-class.h"
 #include "gjs/jsapi-util.h"
diff --git a/tools/gjs-private-iwyu.imp b/tools/gjs-private-iwyu.imp
index 6d3a097c..43fe827c 100644
--- a/tools/gjs-private-iwyu.imp
+++ b/tools/gjs-private-iwyu.imp
@@ -49,5 +49,26 @@
   {"symbol": ["JSFunction", "private", "\"gjs/jsapi-wrapper.h\"", "public"]},
   {"symbol": ["JSLinearString", "private", "\"gjs/jsapi-wrapper.h\"", "public"]},
   {"symbol": ["JSObject", "private", "\"gjs/jsapi-wrapper.h\"", "public"]},
-  {"symbol": ["JSString", "private", "\"gjs/jsapi-wrapper.h\"", "public"]}
-]
\ No newline at end of file
+  {"symbol": ["JSString", "private", "\"gjs/jsapi-wrapper.h\"", "public"]},
+
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_gtype", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_function", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_ns", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_repo", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_byte_array", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_importer", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_context", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_gradient", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_image_surface", "private", "\"gjs/jsapi-class.h\"", 
"public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_linear_gradient", "private", "\"gjs/jsapi-class.h\"", 
"public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_path", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_pattern", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_pdf_surface", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_ps_surface", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_radial_gradient", "private", "\"gjs/jsapi-class.h\"", 
"public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_region", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_solid_pattern", "private", "\"gjs/jsapi-class.h\"", 
"public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_surface", "private", "\"gjs/jsapi-class.h\"", "public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_surface_pattern", "private", "\"gjs/jsapi-class.h\"", 
"public"]},
+  {"symbol": ["GJS_GLOBAL_SLOT_PROTOTYPE_cairo_svg_surface", "private", "\"gjs/jsapi-class.h\"", "public"]},
+]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]