include dir
This commit is contained in:
16
include/acl/alignof.h
Normal file
16
include/acl/alignof.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#if defined(__STDC__)
|
||||||
|
#if (__STDC_VERSION__ >= 201112L)
|
||||||
|
#include <stdalign.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#else
|
||||||
|
#define alignof(type) offsetof(struct { char c; type d; }, d)
|
||||||
|
typedef union {
|
||||||
|
double dummy_double;
|
||||||
|
long double dummy_long_double;
|
||||||
|
long long dummy_long_long;
|
||||||
|
void *dummy_ptr;
|
||||||
|
void (*dummy_func_ptr)(void);
|
||||||
|
} max_align_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#include <stdio.h>
|
||||||
@ -15,4 +15,5 @@ union acl_hashmap_meta {
|
|||||||
union acl_hashmap_meta* acl_hashmap_init(size_t bucketCount, size_t sizeOneElement, size_t offset, size_t keySize);
|
union acl_hashmap_meta* acl_hashmap_init(size_t bucketCount, size_t sizeOneElement, size_t offset, size_t keySize);
|
||||||
void* acl_hashmap_declare(union acl_hashmap_meta *hashmap_meta, void *key);
|
void* acl_hashmap_declare(union acl_hashmap_meta *hashmap_meta, void *key);
|
||||||
void* acl_hashmap_get(union acl_hashmap_meta *hashmap_meta, void *key);
|
void* acl_hashmap_get(union acl_hashmap_meta *hashmap_meta, void *key);
|
||||||
|
bool acl_hashmap_remove;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
4
include/acl/sizeof.h
Normal file
4
include/acl/sizeof.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/* The following macro alows the usage of the sizeof operator without an identifier */
|
||||||
|
#include <stddef.h>
|
||||||
|
#define acl_sizeof(type) offsetof(struct{type a; char b;}, b)
|
||||||
|
offsetof(struct{type a; char b;}, b)
|
||||||
Reference in New Issue
Block a user