Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…ource.
  • Loading branch information...
commit b8c0a8def33db5a7cca0519ba304feadfcb0c0fc 1 parent 274b470
Hari Karam Singh authored February 05, 2012

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  TPCircularBuffer.h
8  TPCircularBuffer.h
@@ -35,6 +35,10 @@
35 35
 
36 36
 #include <libkern/OSAtomic.h>
37 37
 
  38
+#ifdef __cplusplus
  39
+extern "C" {
  40
+#endif
  41
+    
38 42
 typedef struct {
39 43
     void             *buffer;
40 44
     int32_t           length;
@@ -55,3 +59,7 @@ void  TPCircularBufferConsume(TPCircularBuffer *buffer, int32_t amount);
55 59
 void* TPCircularBufferHead(TPCircularBuffer *buffer, int32_t* availableBytes);
56 60
 void  TPCircularBufferProduce(TPCircularBuffer *buffer, int32_t amount);
57 61
 int   TPCircularBufferProduceBytes(TPCircularBuffer *buffer, const void* src, int32_t len);
  62
+
  63
+#ifdef __cplusplus
  64
+}
  65
+#endif

0 notes on commit b8c0a8d

Please sign in to comment.
Something went wrong with that request. Please try again.