Make the containers C++ compatible

This commit is contained in:
Luke Benstead 2018-05-28 08:52:44 +01:00
parent 0e48a3824b
commit f9809ec2b7
3 changed files with 24 additions and 0 deletions

View File

@ -1,6 +1,10 @@
#ifndef ALIGNED_VECTOR_H
#define ALIGNED_VECTOR_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
unsigned int size;
unsigned int capacity;
@ -20,4 +24,8 @@ void aligned_vector_clear(AlignedVector* vector);
void aligned_vector_shrink_to_fit(AlignedVector* vector);
void aligned_vector_cleanup(AlignedVector* vector);
#ifdef __cplusplus
}
#endif
#endif // ALIGNED_VECTOR_H

View File

@ -1,6 +1,10 @@
#ifndef NAMED_ARRAY_H
#define NAMED_ARRAY_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
unsigned int element_size;
unsigned int max_element_count;
@ -16,4 +20,8 @@ void named_array_release(NamedArray* array, unsigned int new_id);
void* named_array_get(NamedArray* array, unsigned int id);
void named_array_cleanup(NamedArray* array);
#ifdef __cplusplus
}
#endif
#endif // NAMED_ARRAY_H

View File

@ -1,6 +1,10 @@
#ifndef STACK_H
#define STACK_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
unsigned char* data;
unsigned int capacity;
@ -14,4 +18,8 @@ void* stack_replace(Stack* stack, const void* element);
void* stack_push(Stack* stack, const void* element);
void stack_pop(Stack* stack);
#ifdef __cplusplus
}
#endif
#endif // STACK_H