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.
As reported by Andy Hochhaus in the pyodbc group, SQL Server fails if you compare a SQL_LONGVARCHAR parameter with a varchar field. Had been using a hardcoded 255 to determine when to switch from VARCHAR to LONGVARCHAR. Now uses SQLGetTypeInfo to determine the maximum varchar and binary widths. This will also help performance for programs that bind a lot of strings greater than 255 but less than their db's max varchar size.
…tion info. The connection info is in preparation for querying even more info per connection to implement Cursor.call Fixed the setup.py file so it doesn't build a debug library all the time. You can add --assert and --trace to turn those on instead of modifying pyodbc.h. Also added a license file (feature request).