The goal as it stands is to make PyObject an opaque type (interpreted to mean, "incomplete type"), but there is a blocking problem to accomplishing that.
Functions/Macros like PY_TYPE require a complete PyObject.
There is 3 ways we can solve this problem:
1) Dump to & export from the Python DLL.
- This will created performance overhead that can scale worse and worse the more they're used.
2) Dump to a static library.
- This has a toss up on saving performance or sharing #1's problem depending on the compiler and options used.
3) Dump to precompiled headers.
- My limited understanding of precompiled headers suggests we can eliminate the need of LTCG, but compilers CAN impose restrictions on their usage (MSVC for sure has restrictions).
What would be the best approach to go with? Ultimately, the end result should have roughly the same performance rating as current non limited code.