Relative Content

Tag Archive for ccastingexpressionimplicit-conversiontype-safety

How to trigger implicit pointer conversion inline in a C macro?

Context I have some functions to support using a custom memory allocator in my library: void *(allocate)(struct allocator *allocator, size_t size, size_t alignment); void (deallocate)(struct allocator *allocator, void *pointer, size_t size, size_t alignment); There’s two things that I would still like to improve upon with this interface: There is a need to write sizeof(type) and […]