2 ms·
C ABI is basically structs + functions + function pointers. On Win32, functions and function pointers includes calling conventions, but that's not really import
by int_19h 7y ago
C ABI is basically structs + functions + function pointers. On Win32, functions and function pointers includes calling conventions, but that's not really important.
COM is a C ABI in a sense that its spec defines everything in these terms. Yes, in practice it translates nicely to C++ vtables, but the stability guarantees are defined on the lower level.
- pjmlp 7y agoFrom that point of view, it is also a Pascal ABI.
- int_19h 7y agoSure, and several dozen other languages. That's really what it is - the lowest common denominator that almost every language can work with.
- pjmlp 7y agoAs the OS ABI should be.
- int_19h 7y agoThis is a kind of a chicken and egg thing - it is the OS ABI because everybody supports it, and everybody supports it because it's the OS ABI. I think that the fact that it has the features that it does is mostly a coincidence of timing, and languages popular at the time on platforms that were popular enough. If it happened 15 years later, the feature set might have been larger.