I'm writing a program that heavily relies on types declared in C. I was wondering, whether there is a way to differentiate C types and Swift types.
Let's say I want to bind a pointer to a type but I only want to do it, if the type was declared in C and throw exception otherwise. So far the only difference I have noticed is, that all the C types belong to a module called __C.
To be more specific, I don't mind Swift types per-se. I just need to be sure, that the layout is done "the C way" and no calls to Swift runtime are made (so no retains etc.). At this time, the only thing stopping a programmer from invoking the code with incorrect type is a warning in documentation. Which seems insufficient to me when the result of incorrect usage of the code may lead to baaaad corruption.