Make the containers C++ compatible
This commit is contained in:
parent
0e48a3824b
commit
f9809ec2b7
|
@ -1,6 +1,10 @@
|
||||||
#ifndef ALIGNED_VECTOR_H
|
#ifndef ALIGNED_VECTOR_H
|
||||||
#define ALIGNED_VECTOR_H
|
#define ALIGNED_VECTOR_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
unsigned int capacity;
|
unsigned int capacity;
|
||||||
|
@ -20,4 +24,8 @@ void aligned_vector_clear(AlignedVector* vector);
|
||||||
void aligned_vector_shrink_to_fit(AlignedVector* vector);
|
void aligned_vector_shrink_to_fit(AlignedVector* vector);
|
||||||
void aligned_vector_cleanup(AlignedVector* vector);
|
void aligned_vector_cleanup(AlignedVector* vector);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // ALIGNED_VECTOR_H
|
#endif // ALIGNED_VECTOR_H
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#ifndef NAMED_ARRAY_H
|
#ifndef NAMED_ARRAY_H
|
||||||
#define NAMED_ARRAY_H
|
#define NAMED_ARRAY_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned int element_size;
|
unsigned int element_size;
|
||||||
unsigned int max_element_count;
|
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_get(NamedArray* array, unsigned int id);
|
||||||
void named_array_cleanup(NamedArray* array);
|
void named_array_cleanup(NamedArray* array);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // NAMED_ARRAY_H
|
#endif // NAMED_ARRAY_H
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#ifndef STACK_H
|
#ifndef STACK_H
|
||||||
#define STACK_H
|
#define STACK_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char* data;
|
unsigned char* data;
|
||||||
unsigned int capacity;
|
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_push(Stack* stack, const void* element);
|
||||||
void stack_pop(Stack* stack);
|
void stack_pop(Stack* stack);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // STACK_H
|
#endif // STACK_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user