I am working on an API that, I think, dates from the 80s and the original architect of the API is not working in our company anymore. The API, let's call it ABC API is defined in a public header file abc.h
that contains following definition:
#define ABC_PTR_DECL *
and then later in many places in the header file:
typedef unsigned char uint8, ABC_PTR_DECL uint8_ptr;
The question is, why would someone #define
the ABC_PTR_DECL and not use the asterisk directly? Are there / were there reasons to have it defined so it can be easily changed in one place?
I'd like to remove this definition in a newer API revisions but I've always wondered why do we have it this way.