aboutsummaryrefslogtreecommitdiff
path: root/libobjc/objc/sarray.h
diff options
context:
space:
mode:
Diffstat (limited to 'libobjc/objc/sarray.h')
-rw-r--r--libobjc/objc/sarray.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libobjc/objc/sarray.h b/libobjc/objc/sarray.h
index a94a98a..5956a43 100644
--- a/libobjc/objc/sarray.h
+++ b/libobjc/objc/sarray.h
@@ -43,11 +43,20 @@ extern const char* __objc_sparse3_id;
#include "objc/thr.h"
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
extern int nbuckets; /* for stats */
extern int nindices;
extern int narrays;
extern int idxsize;
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
#include <assert.h>
/* An unsigned integer of same size as a pointer */
@@ -142,6 +151,10 @@ struct sarray {
size_t capacity;
};
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
struct sarray* sarray_new(int, void* default_element);
void sarray_free(struct sarray*);
struct sarray* sarray_lazy_copy(struct sarray*);
@@ -234,4 +247,9 @@ static inline void* sarray_get_safe(struct sarray* array, sidx indx)
return (array->empty_bucket->elems[0]);
}
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
#endif /* __sarray_INCLUDE_GNU */