Hi everybody, sorry to post this here, but the
handmade.network forums don't seem to have a code forum, but Casey has made an API video in the past and maybe has some ideas about my following questions.
I am currently developing an API to be used by external developers and I need the API to be pure C since I want it to be easily accessible from other languages. Just wanted to know if my following list is missing anything that might make it hard/impossible to interface from other languages, e.g. .Net, Python, COM, or really anything else.
One thing I noticed with COM is that it doesn't seem to support "unsigned" types, only int and long (not sure if that's correct though). Some of my parameters don't make sense to be signed values so I'd prefer to use unsigned int in those cases.
- Can't use references, need to use pointers
- struct as function parameter / return value need to use #pragma pack(push,1) so that there are not compiler dependant alignment issues
- enum evaluates to int, so I will be using int for enum values instead
- if a 64 bit enum is required I probably need to fudge it by using #define 0x0123456789ABCDEFLL
Anything else?
Thanks.