[PATCH v2] include: Add COM_DECLSPEC_NOTHROW define
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Thu Oct 17 18:27:32 CDT 2019
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
include/basetyps.h | 7 +++++--
include/objbase.h | 10 ++++++----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/include/basetyps.h b/include/basetyps.h
index 94875334b0..be4c37e5a7 100644
--- a/include/basetyps.h
+++ b/include/basetyps.h
@@ -40,9 +40,12 @@
#define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
#if defined(__cplusplus) && !defined(CINTERFACE)
+
+#define COM_DECLSPEC_NOTHROW DECLSPEC_NORETURN
+
# define interface struct
-# define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m
-# define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m
+# define STDMETHOD(m) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE m
+# define STDMETHOD_(t,m) virtual COM_DECLSPEC_NOTHROW t STDMETHODCALLTYPE m
# define PURE =0
# define THIS_
# define THIS void
diff --git a/include/objbase.h b/include/objbase.h
index a241b71199..d54f0edb25 100644
--- a/include/objbase.h
+++ b/include/objbase.h
@@ -172,12 +172,14 @@
#if defined(__cplusplus) && !defined(CINTERFACE)
+#define COM_DECLSPEC_NOTHROW DECLSPEC_NORETURN
+
/* C++ interface */
-#define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
-#define STDMETHOD_(type,method) virtual type STDMETHODCALLTYPE method
-#define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method
-#define STDMETHODV_(type,method) virtual type STDMETHODVCALLTYPE method
+#define STDMETHOD(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE method
+#define STDMETHOD_(type,method) virtual COM_DECLSPEC_NOTHROW type STDMETHODCALLTYPE method
+#define STDMETHODV(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODVCALLTYPE method
+#define STDMETHODV_(type,method) virtual COM_DECLSPEC_NOTHROW type STDMETHODVCALLTYPE method
#define PURE = 0
#define THIS_
--
2.17.1
More information about the wine-devel
mailing list