[gjs/restore-msvc-build: 1/3] [gjs|modules]/*.cpp: Include gjs/context-private.h where needed
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/restore-msvc-build: 1/3] [gjs|modules]/*.cpp: Include gjs/context-private.h where needed
- Date: Tue, 25 Aug 2020 07:11:40 +0000 (UTC)
commit 77238f29be8ce633327fbf5bb42d8817c6096dc4
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Aug 25 14:31:40 2020 +0800
[gjs|modules]/*.cpp: Include gjs/context-private.h where needed
This will help us avoid failing the static_assert in js/GCPolicyApi.h where
pointer types are not allowed, when building with Visual Studio, which is
likely caused by the compiler not picking up the needed types when
js/GCPolicyAPI.h is included in some way or the other.
gjs/atoms.cpp | 1 +
gjs/deprecation.cpp | 1 +
gjs/jsapi-util-string.cpp | 1 +
gjs/stack.cpp | 2 +-
modules/cairo.cpp | 1 +
modules/print.cpp | 1 +
6 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gjs/atoms.cpp b/gjs/atoms.cpp
index e6d2be69..f6b9ad5d 100644
--- a/gjs/atoms.cpp
+++ b/gjs/atoms.cpp
@@ -33,6 +33,7 @@
#include <js/TypeDecls.h>
#include <jsapi.h> // for JS_AtomizeAndPinString
+#include "gjs/context-private.h" // Avoid static_assert error in MSVC builds
#include "gjs/atoms.h"
bool GjsAtom::init(JSContext* cx, const char* str) {
diff --git a/gjs/deprecation.cpp b/gjs/deprecation.cpp
index 4798d6d3..26c1772f 100644
--- a/gjs/deprecation.cpp
+++ b/gjs/deprecation.cpp
@@ -39,6 +39,7 @@
#include <jsapi.h> // for MaxFrames, CaptureCurrentStack
#include <jsfriendapi.h> // for FormatStackDump
+#include "gjs/context-private.h" // Avoid static_assert error in MSVC builds
#include "gjs/deprecation.h"
#include "gjs/macros.h"
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index 9e97ead8..67ac6d92 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -47,6 +47,7 @@
#include <jsapi.h> // for JSID_TO_FLAT_STRING, JS_GetTwoByte...
#include <jsfriendapi.h> // for FlatStringToLinearString, GetLatin...
+#include "gjs/context-private.h" // Avoid static_assert error in MSVC builds
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
diff --git a/gjs/stack.cpp b/gjs/stack.cpp
index c3137411..6c10051c 100644
--- a/gjs/stack.cpp
+++ b/gjs/stack.cpp
@@ -50,7 +50,7 @@
#include <js/TypeDecls.h>
#include <jsfriendapi.h> // for DumpBacktrace
-#include "gjs/context.h"
+#include "gjs/context-private.h" // Avoid static_assert error in MSVC builds
void
gjs_context_print_stack_stderr(GjsContext *context)
diff --git a/modules/cairo.cpp b/modules/cairo.cpp
index b4a7fb96..dcf11a02 100644
--- a/modules/cairo.cpp
+++ b/modules/cairo.cpp
@@ -29,6 +29,7 @@
#include <js/TypeDecls.h>
#include <jsapi.h> // for JS_NewPlainObject
+#include "gjs/context-private.h" // Avoid static_assert error in MSVC builds
#include "gjs/jsapi-util.h"
#include "modules/cairo-private.h"
diff --git a/modules/print.cpp b/modules/print.cpp
index bccbcfed..37e4a050 100644
--- a/modules/print.cpp
+++ b/modules/print.cpp
@@ -19,6 +19,7 @@
#include <js/Utility.h> // for UniqueChars
#include <jsapi.h>
+#include "gjs/context-private.h" // Avoid static_assert error in MSVC builds
#include "gjs/jsapi-util.h"
#include "modules/print.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]