Fixed issue 91 - handling of decimals was incorrect (off by 1). Added lots of SQL Server unit tests. To properly fix this, reworked and simplified parameter binding. Instead of separating the memory requirement and the actual memory preparation, it is now performed in 1 step and stored in the new ParamInfo structures. I added a lot of optional malloc calls (not usually used), so I added a PYODBC_LEAK_CHECK parameter which causes pyodbc_malloc and pyodbc_free to track allocations. This is not thread safe and is intended only for troubleshooting.
Fixes found with UCS4 Python and UCS2 SQLWCHAR (Fedora 13 64-bit). Connection code now uses common SQLWChar class too. Added pyodbc.UNICODE_SIZE and pyodbc.SQLWCHAR_SIZE to help troubleshoot problems. Fixed some printfs 64-bit problems.
Reworked Unicode support, properly differentiating between SQLWCHAR on the different platforms. This should fix a lot of the OS/X problems and perhaps Linux UCS4 build problems. Version format now includes the branch name if not 'master' or v<version>, allowing custom builds to be identified, such as v2unicode-2.1.8-beta03. Also tested with 64-bit Windows builds, so more Py_ssize_t warnings were found and corrected. Created TRACE macro to replace the #ifdefs sprinkled through the code.