summaryrefslogtreecommitdiffstats
path: root/common/gl_canvas.h
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-04-19 22:58:36 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-05-02 11:24:44 +0200
commit60373e01fa9273751b037998329645072e21e837 (patch)
tree148aaaa1cc1ceed9f7a40098267564f7b633f882 /common/gl_canvas.h
parent06c83ca99458f611d871936c9d1bf433703a8f05 (diff)
downloadspice-60373e01fa9273751b037998329645072e21e837.tar.gz
spice-60373e01fa9273751b037998329645072e21e837.tar.xz
spice-60373e01fa9273751b037998329645072e21e837.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/gl_canvas.h')
-rw-r--r--common/gl_canvas.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/gl_canvas.h b/common/gl_canvas.h
index d7125e60..ff3fba06 100644
--- a/common/gl_canvas.h
+++ b/common/gl_canvas.h
@@ -20,6 +20,10 @@
#include "canvas_base.h"
#include "region.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
SpiceCanvas *gl_canvas_create(int width, int height, uint32_t format
#ifdef SW_CANVAS_CACHE
, SpiceImageCache *bits_cache
@@ -35,3 +39,6 @@ SpiceCanvas *gl_canvas_create(int width, int height, uint32_t format
void gl_canvas_set_textures_lost(SpiceCanvas *canvas, int textures_lost);
void gl_canvas_init();
+#ifdef __cplusplus
+}
+#endif