[gjs/msvc.partial.fix: 20/23] TEMP COMMIT - fix iwyu
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/msvc.partial.fix: 20/23] TEMP COMMIT - fix iwyu
- Date: Mon, 8 Mar 2021 09:04:00 +0000 (UTC)
commit eedff9bd09b4db8320e134e37df4dfd9baadc7d3
Author: Philip Chimento <philip chimento gmail com>
Date: Thu Mar 4 20:55:19 2021 -0800
TEMP COMMIT - fix iwyu
modules/cairo-context.cpp | 3 +--
modules/cairo-gradient.cpp | 3 +--
modules/cairo-image-surface.cpp | 3 +--
modules/cairo-linear-gradient.cpp | 10 +++-------
modules/cairo-path.cpp | 3 +--
modules/cairo-pdf-surface.cpp | 10 +++-------
modules/cairo-ps-surface.cpp | 10 +++-------
modules/cairo-radial-gradient.cpp | 10 +++-------
modules/cairo-solid-pattern.cpp | 3 +--
modules/cairo-surface-pattern.cpp | 3 +--
modules/cairo-svg-surface.cpp | 10 +++-------
11 files changed, 21 insertions(+), 47 deletions(-)
---
diff --git a/modules/cairo-context.cpp b/modules/cairo-context.cpp
index 76c94cf5..f1d12b23 100644
--- a/modules/cairo-context.cpp
+++ b/modules/cairo-context.cpp
@@ -13,6 +13,7 @@
#include <js/Array.h> // for JS::NewArrayObject
#include <js/CallArgs.h>
#include <js/Conversions.h>
+#include <js/GCPolicyAPI.h>
#include <js/PropertyDescriptor.h> // for JSPROP_READONLY
#include <js/PropertySpec.h>
#include <js/RootingAPI.h>
@@ -33,8 +34,6 @@
// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
diff --git a/modules/cairo-gradient.cpp b/modules/cairo-gradient.cpp
index bbba5af3..c8491ae8 100644
--- a/modules/cairo-gradient.cpp
+++ b/modules/cairo-gradient.cpp
@@ -7,6 +7,7 @@
#include <cairo.h>
#include <js/CallArgs.h>
+#include <js/GCPolicyAPI.h>
#include <js/PropertyDescriptor.h> // for JSPROP_READONLY
#include <js/PropertySpec.h>
#include <js/RootingAPI.h>
@@ -21,8 +22,6 @@
// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
diff --git a/modules/cairo-image-surface.cpp b/modules/cairo-image-surface.cpp
index ecbc2553..6bb5aefa 100644
--- a/modules/cairo-image-surface.cpp
+++ b/modules/cairo-image-surface.cpp
@@ -7,6 +7,7 @@
#include <cairo.h>
#include <js/CallArgs.h>
+#include <js/GCPolicyAPI.h>
#include <js/PropertyDescriptor.h> // for JSPROP_READONLY
#include <js/PropertySpec.h>
#include <js/RootingAPI.h>
@@ -21,8 +22,6 @@
// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
diff --git a/modules/cairo-linear-gradient.cpp b/modules/cairo-linear-gradient.cpp
index 70675a78..45b8fb17 100644
--- a/modules/cairo-linear-gradient.cpp
+++ b/modules/cairo-linear-gradient.cpp
@@ -6,6 +6,7 @@
#include <cairo.h>
+#include <js/GCPolicyAPI.h>
#include <js/PropertyDescriptor.h> // for JSPROP_READONLY
#include <js/PropertySpec.h>
#include <js/RootingAPI.h>
@@ -16,18 +17,13 @@
#include "gjs/jsapi-util-args.h"
#include "modules/cairo-private.h"
-// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
+class CallArgs;
+// Avoid static_assert in MSVC builds
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
-namespace JS {
-class CallArgs;
-}
-
JSObject* CairoLinearGradient::new_proto(JSContext* cx, JSProtoKey) {
JS::RootedObject parent_proto(cx, CairoGradient::prototype(cx));
return JS_NewObjectWithGivenProto(cx, nullptr, parent_proto);
diff --git a/modules/cairo-path.cpp b/modules/cairo-path.cpp
index cabbf8b8..3216aacb 100644
--- a/modules/cairo-path.cpp
+++ b/modules/cairo-path.cpp
@@ -8,6 +8,7 @@
#include <cairo.h>
#include <glib.h> // for g_assert
+#include <js/GCPolicyAPI.h>
#include <js/PropertyDescriptor.h> // for JSPROP_READONLY
#include <js/PropertySpec.h>
#include <js/RootingAPI.h>
@@ -18,8 +19,6 @@
// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
diff --git a/modules/cairo-pdf-surface.cpp b/modules/cairo-pdf-surface.cpp
index a9403da2..add65a1c 100644
--- a/modules/cairo-pdf-surface.cpp
+++ b/modules/cairo-pdf-surface.cpp
@@ -8,6 +8,7 @@
#include <cairo-features.h> // for CAIRO_HAS_PDF_SURFACE
#include <cairo.h>
+#include <js/GCPolicyAPI.h>
#include <js/TypeDecls.h>
#include "gjs/jsapi-util.h"
@@ -24,18 +25,13 @@
# include "gjs/jsapi-util-args.h"
# include "modules/cairo-private.h"
-// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
+class CallArgs;
+// Avoid static_assert in MSVC builds
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
-namespace JS {
-class CallArgs;
-}
-
JSObject* CairoPDFSurface::new_proto(JSContext* cx, JSProtoKey) {
JS::RootedObject parent_proto(cx, CairoSurface::prototype(cx));
return JS_NewObjectWithGivenProto(cx, nullptr, parent_proto);
diff --git a/modules/cairo-ps-surface.cpp b/modules/cairo-ps-surface.cpp
index 798cde7f..5da8b787 100644
--- a/modules/cairo-ps-surface.cpp
+++ b/modules/cairo-ps-surface.cpp
@@ -8,6 +8,7 @@
#include <cairo-features.h> // for CAIRO_HAS_PS_SURFACE
#include <cairo.h>
+#include <js/GCPolicyAPI.h>
#include <js/TypeDecls.h>
#include "gjs/jsapi-util.h"
@@ -24,18 +25,13 @@
# include "gjs/jsapi-util-args.h"
# include "modules/cairo-private.h"
-// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
+class CallArgs;
+// Avoid static_assert in MSVC builds
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
-namespace JS {
-class CallArgs;
-}
-
JSObject* CairoPSSurface::new_proto(JSContext* cx, JSProtoKey) {
JS::RootedObject parent_proto(cx, CairoSurface::prototype(cx));
return JS_NewObjectWithGivenProto(cx, nullptr, parent_proto);
diff --git a/modules/cairo-radial-gradient.cpp b/modules/cairo-radial-gradient.cpp
index bf6e9bc4..5f2516e6 100644
--- a/modules/cairo-radial-gradient.cpp
+++ b/modules/cairo-radial-gradient.cpp
@@ -6,6 +6,7 @@
#include <cairo.h>
+#include <js/GCPolicyAPI.h>
#include <js/PropertyDescriptor.h> // for JSPROP_READONLY
#include <js/PropertySpec.h>
#include <js/RootingAPI.h>
@@ -16,18 +17,13 @@
#include "gjs/jsapi-util-args.h"
#include "modules/cairo-private.h"
-// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
+class CallArgs;
+// Avoid static_assert in MSVC builds
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
-namespace JS {
-class CallArgs;
-}
-
JSObject* CairoRadialGradient::new_proto(JSContext* cx, JSProtoKey) {
JS::RootedObject parent_proto(cx, CairoGradient::prototype(cx));
return JS_NewObjectWithGivenProto(cx, nullptr, parent_proto);
diff --git a/modules/cairo-solid-pattern.cpp b/modules/cairo-solid-pattern.cpp
index 0894f99a..664c290c 100644
--- a/modules/cairo-solid-pattern.cpp
+++ b/modules/cairo-solid-pattern.cpp
@@ -7,6 +7,7 @@
#include <cairo.h>
#include <js/CallArgs.h>
+#include <js/GCPolicyAPI.h>
#include <js/PropertyDescriptor.h> // for JSPROP_READONLY
#include <js/PropertySpec.h>
#include <js/RootingAPI.h>
@@ -20,8 +21,6 @@
// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
diff --git a/modules/cairo-surface-pattern.cpp b/modules/cairo-surface-pattern.cpp
index ec30ca85..35557bca 100644
--- a/modules/cairo-surface-pattern.cpp
+++ b/modules/cairo-surface-pattern.cpp
@@ -7,6 +7,7 @@
#include <cairo.h>
#include <js/CallArgs.h>
+#include <js/GCPolicyAPI.h>
#include <js/PropertyDescriptor.h> // for JSPROP_READONLY
#include <js/PropertySpec.h>
#include <js/RootingAPI.h>
@@ -21,8 +22,6 @@
// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
diff --git a/modules/cairo-svg-surface.cpp b/modules/cairo-svg-surface.cpp
index d17c806d..53f7e585 100644
--- a/modules/cairo-svg-surface.cpp
+++ b/modules/cairo-svg-surface.cpp
@@ -8,6 +8,7 @@
#include <cairo-features.h> // for CAIRO_HAS_SVG_SURFACE
#include <cairo.h>
+#include <js/GCPolicyAPI.h>
#include <js/TypeDecls.h>
#include "gjs/jsapi-util.h"
@@ -24,18 +25,13 @@
# include "gjs/jsapi-util-args.h"
# include "modules/cairo-private.h"
-// Avoid static_assert in MSVC builds
namespace JS {
-template <typename T> struct GCPolicy;
-
+class CallArgs;
+// Avoid static_assert in MSVC builds
template <>
struct GCPolicy<void*> : public IgnoreGCPolicy<void*> {};
}
-namespace JS {
-class CallArgs;
-}
-
JSObject* CairoSVGSurface::new_proto(JSContext* cx, JSProtoKey) {
JS::RootedObject parent_proto(cx, CairoSurface::prototype(cx));
return JS_NewObjectWithGivenProto(cx, nullptr, parent_proto);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]