`Region` pollutes namespace
arena.h defines the type Region which is a very generic name. This can easily result in naming collisions when arena.h is included into a project. This feels especially unnecessary because the user of the library is not really supposed to use the Region type from this library.
It is just a minor inconvenience but it would be nice to avoid. Maybe Region can be prefixed?
Has it already caused actual issues for you?
Apparently Xutil.h defines a type called Region.
#include <stdio.h>
#define ARENA_IMPLEMENTATION
#include "arena.h"
#include <X11/Xutil.h>
int main(void) {
printf("hello\n");
}
This code throws an error when compiled with
$ gcc -o main main.c
I noticed this when I tried out RGFW after one of your streams because RGFW includes X11 libraries (on linux). As a workaround I included RGFW only as a header and compiled the RGFW code separately. It works fine but it is inconvenient.
imo the best solution would be a prefix but there are probably other work too. For instance in Raylib RGFW links windows.h which has plenty of conflicts and so I had to do something like this:
#define Region Region_X11
#include "RGFW.h"
#undef Region