I don’t see how you can make:
- return a pointer - the library owns the allocation - the state is global and mutable
Thread safe
- return a pointer - the library owns the allocation - the state is global and mutable
Thread safe
There are, however, other problems (discussed elsewhere in this thread) that complicate such an API in the context of getenv().