sdgathman / pymilter

Python bindings for libmilter api
GNU General Public License v2.0
42 stars 22 forks source link

Use IFDEF for miltermodule.c changes vice add-on patch #22

Closed kitterma closed 5 years ago

kitterma commented 5 years ago

Here's a patch that builds with no warnings on both python2.7 and python3.7. IFDEF_Integrate-Py3-changes.txt

sdgathman commented 5 years ago

If we go the IFDEF route, then it needs additional work to make it more readable. For instance, I could conditionally #define staticforward static, but that would be confusing to those not acquainted with the code history. A new macro, maybe PyStatic (but would that conflict with something defined in Py3 API?) would not look py2 API code.

sdgathman commented 5 years ago

Eh, I should just apply the patch (it looks like it was derived mechanically from milter.patch) and evolve readability later.

sdgathman commented 5 years ago

Ifdef changes pushed with a few readability tweaks in a separate commit. https://github.com/sdgathman/pymilter/commit/f9b2241ec69d342bd402d0042a763a810ad6961c