1) Renamed USE_INLINE to PIL_USE_INLINE to avoid conflicts with
other headers/libraries.
2) Replace __WIN32__ and WIN32 with _WIN32
3) Don't define WIN32 when the compiler is MSVC but not on Windows
Why would you even...
4) Don't define strcasecmp if you're not even going to use it.
5) Don't include Windows.h with undefs for compilers newer than
1998 everywhere.
6) Don't surpress warnings for MSVC++ 4.0. People still using
MSVC++ 4.0 deserve it.
7) Don't include things that are already included in Windows.h
This commit also renames some functions from "fromstring" and the like to
"frombytes". I'll probably need to come back later and update any
references to "string," here or in the docs.
I also noticed that encode allocates some data for certain codecs, but
never frees them. That would be a good bug to fix. I fixed the one where it
outright stole a pointer from Python.
This updates several Python type definitions and uses to bring us closer
to Python 3 compatibility. This includes:
* Replacing staticforward and statichere with static. These were a hack for
old compilers and are not supported/needed anymore.
* Using Py_TYPE() instead of ob_type; ob_type is hidden in Py3.
* Replacing getattr with getters/setters. getattr is sort-of supported in
Py3, but Py_FindMethod is not. So we just use the newer
methods/getsetters mechanisms and start using PyType_Ready everywhere.
* Use PyVarObject_HEAD_INIT for types, since types are PyVarObject.
* Use PyMODINIT_FUNC for module initialization functions.
There are some tab/space issues in this commit. I'm set for spaces; the
source is a little schizo.