Hide the C++ extern "C" declarations behind macros.
authorSøren Sandmann Pedersen <ssp@redhat.com>
Sun, 21 Feb 2010 07:01:16 +0000 (02:01 -0500)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sun, 21 Feb 2010 07:07:32 +0000 (02:07 -0500)
That way they don't confuse the indenting algorithm in editors such as
Emacs.

pixman/pixman.h

index 5009c6d..69af0f9 100644 (file)
@@ -72,9 +72,15 @@ SOFTWARE.
 #include <pixman-version.h>
 
 #ifdef  __cplusplus
-extern "C" {
+#define PIXMAN_BEGIN_DECLS extern "C" {
+#define PIXMAN_END_DECLS }
+#else
+#define PIXMAN_BEGIN_DECLS
+#define PIXMAN_END_DECLS
 #endif
 
+PIXMAN_BEGIN_DECLS
+
 /*
  * Standard integers
  */
@@ -918,8 +924,6 @@ void           pixman_rasterize_trapezoid  (pixman_image_t            *image,
                                            int                        x_off,
                                            int                        y_off);
 
-#ifdef  __cplusplus
-}
-#endif
+PIXMAN_END_DECLS
 
 #endif /* PIXMAN_H__ */