Commit Graph

13 Commits

Author SHA1 Message Date
nu774
2be12dec2b Don't use int to handle type
Couldn't accept handle values greater than 0x7FFFFFFF, which wasn't enough even on 32bit system, and completely wrong for 64bit.
2015-10-01 14:54:32 +01:00
Nicolas F
052ea606bf Clean up defines and includes for Windows
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
2014-05-09 21:05:30 +02:00
Alex Clark
bb1b3a532c Cleanup WS, courtesy of @Arfrever
find * -type f "-(" -name "*.bdf" -o -name "*.c" -o -name "*.h" -o -name "*.py" -o -name "*.rst" -o -name "*.txt" "-)" -exec sed -e "s/[[:space:]]*$//" -i {} \;
2013-06-30 18:42:19 -04:00
Mikhail Korobov
c59c6609f3 Restore fromstring & tostring aliases in 3.x 2013-03-07 15:23:40 +06:00
Alex Clark ☺
5b369a71c5 Merge pull request #54 from cgohlke/patch-2
Fix Windows 64 bit issues
2013-03-05 10:54:08 -08:00
Christoph Gohlke
4e981b2ef6 Use SetWindowLongPtr instead of SetWindowLong 2013-02-13 19:10:28 -08:00
Christoph Gohlke
8b70b2fb79 Use Py_ssize_t instead of long 2013-02-13 18:52:41 -08:00
Bryant Mairs
f3d601b579 Python 3-ified _imagingcms.c and display.c, at least when compiling for Py3.3x64 on Win7x64 with MSVC10. 2013-02-01 17:45:16 +01:00
Brian Crowell
a8599e8bb2 py3k: Remove ancient Python hacks 2013-01-10 08:46:57 -06:00
Brian Crowell
8b704e3005 py3k: Publish both frombytes and fromstring in C modules for old Python
To ease the transition, frombytes and tobytes need to be declared in both
versions.
2013-01-10 08:46:55 -06:00
Brian Crowell
9631d42b60 py3k: Use "y#" code in PyArg_ParseTuple where we expect byte data
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.
2013-01-10 08:46:38 -06:00
Brian Crowell
9519013466 py3k: Modernize type declarations
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.
2013-01-10 08:46:34 -06:00
Alex Clark
9a640e3157 Forking PIL 2010-07-30 22:52:47 -04:00