Permalink
Browse files

Add 'extern' wrapper in header to prevent compilation errors in c++ s…

…ource.
  • Loading branch information...
1 parent 274b470 commit b8c0a8def33db5a7cca0519ba304feadfcb0c0fc Hari Karam Singh committed Feb 5, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 TPCircularBuffer.h
View
@@ -35,6 +35,10 @@
#include <libkern/OSAtomic.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
void *buffer;
int32_t length;
@@ -55,3 +59,7 @@ void TPCircularBufferConsume(TPCircularBuffer *buffer, int32_t amount);
void* TPCircularBufferHead(TPCircularBuffer *buffer, int32_t* availableBytes);
void TPCircularBufferProduce(TPCircularBuffer *buffer, int32_t amount);
int TPCircularBufferProduceBytes(TPCircularBuffer *buffer, const void* src, int32_t len);
+
+#ifdef __cplusplus
+}
+#endif

0 comments on commit b8c0a8d

Please sign in to comment.