From: <mi...@st...> - 2005-03-04 12:12:32
|
Deepak Giridharagopal wrote: > On Thu, 2005-03-03 at 01:45 +0100, Michael Ströder wrote: > >>No easy way to make it work without another #if ? > > It took me a while to find it (I didn't know it existed!), but there is > a function, Py_GetVersion, Sorry, I meant a solution without checking the Python version at all. > This patch is a little longer than the previous one, but it works just > as well. Plus, this way we're doing a run-time check instead of a > compile-time check. If we have to check the Python version a compile-time check would be the preferred solution (see below why). > This will let people upgrade to Python 2.3+ without > having to recompile python-ldap. Extension modules are not binary-compatible between media versions of Python. A module compiled for 2.2 cannot run under Python 2.3 without being rebuilt. Ciao, Michael. |