summaryrefslogtreecommitdiffstats
path: root/common/rect.h
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-04-19 22:58:36 +0200
committerAlon Levy <alevy@redhat.com>2011-07-21 15:09:27 +0300
commit6bd492fa7975b90a3be31c65ba1fbafdd0002f0f (patch)
treef2a566ef234af22cd630f7a26c983af3a02c4565 /common/rect.h
parent3dab7bda53901a80e15b98392fb8948b2f298ca1 (diff)
downloadspice-6bd492fa7975b90a3be31c65ba1fbafdd0002f0f.tar.gz
spice-6bd492fa7975b90a3be31c65ba1fbafdd0002f0f.tar.xz
spice-6bd492fa7975b90a3be31c65ba1fbafdd0002f0f.zip
common: add extern "C" guards to headers
Since some spice C++ code is using code from common/, the C functions need to be marked as such for the C++ compiler, otherwise we'll get linkage issues.
Diffstat (limited to 'common/rect.h')
-rw-r--r--common/rect.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/rect.h b/common/rect.h
index cdd43350..6d7c4466 100644
--- a/common/rect.h
+++ b/common/rect.h
@@ -22,6 +22,10 @@
#include "draw.h"
#include <spice/macros.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
static inline void rect_sect(SpiceRect* r, const SpiceRect* bounds)
{
r->left = MAX(r->left, bounds->left);
@@ -73,6 +77,10 @@ static inline int rect_is_same_size(const SpiceRect *r1, const SpiceRect *r2)
}
#ifdef __cplusplus
+}
+#endif
+
+#ifdef __cplusplus
static inline void rect_sect(SpiceRect& r, const SpiceRect& bounds)
{