Commit Graph

9 Commits

Author SHA1 Message Date
Sandro Mani
8324a9a3e0 Fix issue 447: Apparently some drivers only emit SANE_STATUS_EOF once, and SANE_STATUS_IO_ERROR after that. The code however assumed that the driver keeps emitting SANE_STATUS_EOF. This commit fixes this. 2014-01-26 00:11:15 +01: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
Sandro Mani
0a8291e1a4 Fix warnings: variable set but not used 2013-04-12 17:54:21 +02:00
Damian Wrobel
9f9ccc1664 Fixes an uninitialized value for an optional parameter.
Effectively, this prevented any remote scanners to be discovered.
2013-03-22 19:59:27 +01:00
Brian J. Crowell
e49cba9b32 Handle Sane option strings as Unicode strings
The Sane documentation seems to imply that these option strings contain
Latin-1 text, not byte data, so we decode it and present it to the user
that way.
2013-01-10 08:52:46 -06:00
Brian J. Crowell
fb2ccb15a7 Set up Sane error object as exception instead of string
String exceptions don't work anymore.
2013-01-10 08:52:46 -06:00
Sandro Mani
e84cc92036 Make pysane Python3-compatible 2013-01-10 08:52:45 -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