Fix getting of booleans.

This commit is contained in:
Jiri Popelka 2013-07-31 15:46:51 +02:00
parent 70aba906ee
commit c6b51ff32e
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,21 @@
From 2e0078c0bcc4f02aa904cac00028da43cb6f6862 Mon Sep 17 00:00:00 2001
From: Jiri Popelka <jpopelka@redhat.com>
Date: Wed, 31 Jul 2013 15:31:15 +0200
Subject: [PATCH] Fix getting of boolean values.
diff --git a/cupsconnection.c b/cupsconnection.c
index d386e95..dda9789 100644
--- a/cupsconnection.c
+++ b/cupsconnection.c
@@ -641,7 +641,7 @@ PyObject_from_attr_value (ipp_attribute_t *attr, int i)
val = PyInt_FromLong (ippGetInteger (attr, i));
break;
case IPP_TAG_BOOLEAN:
- val = PyBool_FromLong (ippGetInteger (attr, i));
+ val = PyBool_FromLong (ippGetBoolean (attr, i));
break;
case IPP_TAG_RANGE:
lower = ippGetRange (attr, i, &upper);
--
1.8.3.1

View File

@ -6,11 +6,12 @@
Summary: Python bindings for CUPS
Name: python-cups
Version: 1.9.63
Release: 3%{?dist}
Release: 4%{?dist}
URL: http://cyberelk.net/tim/software/pycups/
Source: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2
Patch1: python-cups-uris.patch
Patch2: python-cups-decoding.patch
Patch3: python-cups-booleans.patch
License: GPLv2+
Group: Development/Languages
BuildRequires: cups-devel
@ -38,6 +39,9 @@ Documentation for python-cups.
# Propagate UTF-8 decoding errors.
%patch2 -p1 -b .decoding
# Fix getting of booleans.
%patch3 -p1 -b .booleans
%build
make CFLAGS="%{optflags} -fno-strict-aliasing"
make doc
@ -56,6 +60,9 @@ make install DESTDIR="%{buildroot}"
%doc examples html
%changelog
* Wed Jul 31 2013 Jiri Popelka <jpopelka@redhat.com> - 1.9.63-4
- Fix getting of booleans.
* Fri Apr 12 2013 Tim Waugh <twaugh@redhat.com> - 1.9.63-3
- Propagate UTF-8 decoding errors.