gallium: Surround externs with extern "C".
[mesa.git] / src / gallium / auxiliary / pipebuffer / pb_buffer.h
index 97beb5f72a9f39822a3482c3ed3d1c7961c71128..4b09c80b2a1d992fe7f61dfd60795fdaaa5cd941 100644 (file)
@@ -37,7 +37,7 @@
  * There is no obligation of a winsys driver to use this library. And a pipe
  * driver should be completly agnostic about it.
  * 
- * \author José Fonseca <jrfonseca@tungstengraphics.com>
+ * \author Jos Fonseca <jrfonseca@tungstengraphics.com>
  */
 
 #ifndef PB_BUFFER_H_
 #include "pipe/p_inlines.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 struct pb_vtbl;
 
 /**
@@ -166,6 +171,7 @@ static INLINE void
 pb_destroy(struct pb_buffer *buf)
 {
    assert(buf);
+   assert(buf->vtbl);
    buf->vtbl->destroy(buf);
 }
 
@@ -199,4 +205,8 @@ void
 pb_init_winsys(struct pipe_winsys *winsys);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*PB_BUFFER_H_*/