[m-rev.] diff: make use of MSVC's __inline extension

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Nov 12 15:49:00 AEDT 2011


Branches: main, 11.07

runtime/mercury_std.h:
 	Add MSVC specific definitions of MR_STATIC_INLINE and friends that
 	make use of MSVC's __inline extension.

Julien.

Index: runtime/mercury_std.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_std.h,v
retrieving revision 1.36
diff -u -r1.36 mercury_std.h
--- runtime/mercury_std.h	12 Sep 2011 16:29:55 -0000	1.36
+++ runtime/mercury_std.h	12 Nov 2011 04:21:55 -0000
@@ -176,6 +176,11 @@
    #define MR_INLINE			static __inline__
    #define MR_EXTERN_INLINE		extern __inline__
    #define MR_OUTLINE_DEFN(DECL,BODY)	DECL BODY
+#elif defined(MR_MSVC)
+  #define MR_STATIC_INLINE              static __inline
+  #define MR_INLINE                     static __inline
+  #define MR_EXTERN_INLINE              extern __inline
+  #define MR_OUTLINE_DEFN(DECL, BODY)
  #elif __STDC_VERSION__ >= 199901
    /* C99 */
    #define MR_STATIC_INLINE		static inline


--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list