H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
205 stars 81 forks source link

Split off the parts of pyGlueHelpers.h that don't require Python.h #1568

Closed dgelessus closed 7 months ago

dgelessus commented 7 months ago

Fixes the issue discussed in https://github.com/H-uru/Plasma/pull/1563#discussion_r1478776517, namely that pyGlueHelpers.h only worked correctly if Python.h was included first.

This adds a new separate pyGlueDefinitions.h with only the macros that work without Python.h, which is safe to include from other headers that shouldn't pull in Python.h. All macros that require Python.h remain in pyGlueHelpers.h, which now explicitly includes Python.h to fix the include order dependency.

The diff is quite big, because I had to change all Python glue files to the new header structure. Since I was already touching all of the Python includes, I used this opportunity to bring them into the standard include order as well. The actually interesting part of the change is in pyGlueDefinitions.h and pyGlueHelpers.h.