diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2011-04-19 22:58:36 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:25:51 +0100 |
commit | c15c5050afa972a8918427e213a2500b44328b85 (patch) | |
tree | 9502f025eb55001f35c10576712e4f3f28f9ebe7 /common/rect.h | |
parent | 5b0b6d2f8431f55394b0766f0cbe5c26f89fd6cd (diff) | |
download | spice-common-c15c5050afa972a8918427e213a2500b44328b85.tar.gz spice-common-c15c5050afa972a8918427e213a2500b44328b85.tar.xz spice-common-c15c5050afa972a8918427e213a2500b44328b85.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.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/rect.h b/common/rect.h index cdd4335..6d7c446 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) { |