Skip to content
Browse files

Added missing C linkage for the odd case that this is thrown at a C++…

… compiler. Which it shouldn't be, but I'm paranoid.
  • Loading branch information...
1 parent 579c969 commit 2992ab609ab0f754df4c9971ee34b0152ffaed5f @nilium committed
Showing with 25 additions and 0 deletions.
  1. +8 −0 src/autoreleasepool.c
  2. +8 −0 src/dynarray.c
  3. +9 −0 src/threadstorage.c
View
8 src/autoreleasepool.c
@@ -9,6 +9,11 @@
#include "dynarray.h"
#include "threadstorage.h"
+#if defined(__cplusplus)
+extern "C"
+{
+#endif /* __cplusplus */
+
#define AUTORELEASE_POOL_ALLOC_TAG 0x0D007011
typedef struct s_autoreleasepool autoreleasepool_t;
@@ -83,3 +88,6 @@ void autoreleasepool_pop()
array_resize(base->objectArray, dest);
}
+#if defined(__cplusplus)
+}
+#endif /* __cplusplus */
View
8 src/dynarray.c
@@ -7,6 +7,11 @@
#include "dynarray.h"
+#if defined(__cplusplus)
+extern "C"
+{
+#endif /* __cplusplus */
+
#define ARRAY_ALLOC_TAG 0x00A77A70
static array_t *array_ctor(array_t *self);
@@ -156,3 +161,6 @@ void *array_buffer(array_t *self, size_t *byteLength)
return self->buf;
}
+#if defined(__cplusplus)
+}
+#endif /* __cplusplus */
View
9 src/threadstorage.c
@@ -7,6 +7,11 @@
#include "threadstorage.h"
+#if defined(__cplusplus)
+extern "C"
+{
+#endif /* __cplusplus */
+
#if USE_PTHREADS
#define DTOR_KV_CAPACITY 32
@@ -114,3 +119,7 @@ void *tls_get(tlskey_t key)
#endif
+#if defined(__cplusplus)
+}
+#endif /* __cplusplus */
+

0 comments on commit 2992ab6

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