Hello community,

here is the log from the commit of package python-cffi for openSUSE:Factory 
checked in at 2016-05-31 12:11:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cffi (Old)
 and      /work/SRC/openSUSE:Factory/.python-cffi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cffi"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cffi/python-cffi.changes  2016-05-23 
16:38:04.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-cffi.new/python-cffi.changes     
2016-05-31 12:12:00.000000000 +0200
@@ -1,0 +2,27 @@
+Sun May 29 05:23:27 UTC 2016 - badshah...@gmail.com
+
+- Add python-cffi-avoid-bitshifting-negative-int.patch to actually
+  fix the "negative left shift" warning by replacing bitshifting
+  in appropriate places by bitwise and comparison to self; patch
+  taken from upstream git. Drop cffi-1.5.2-wnoerror.patch: no
+  longer required.
+
+-------------------------------------------------------------------
+Fri May 27 13:00:22 UTC 2016 - jmate...@suse.com
+
+- disable "negative left shift" warning in test suite to prevent
+  failures with gcc6, until upstream fixes the undefined code
+  in question (boo#981848, cffi-1.5.2-wnoerror.patch)
+
+-------------------------------------------------------------------
+Thu May 26 02:33:02 UTC 2016 - badshah...@gmail.com
+
+- Update to version 1.6.0:
+  * ffi.list_types()
+  * ffi.unpack()
+  * extern “Python+C”
+  * in API mode, lib.foo.__doc__ contains the C signature now.
+  * Yet another attempt at robustness of ffi.def_extern() against
+    CPython’s interpreter shutdown logic.
+
+-------------------------------------------------------------------

Old:
----
  cffi-1.5.2.tar.gz

New:
----
  cffi-1.6.0.tar.gz
  python-cffi-avoid-bitshifting-negative-int.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-cffi.spec ++++++
--- /var/tmp/diff_new_pack.SAZSgk/_old  2016-05-31 12:12:01.000000000 +0200
+++ /var/tmp/diff_new_pack.SAZSgk/_new  2016-05-31 12:12:01.000000000 +0200
@@ -17,14 +17,16 @@
 
 
 Name:           python-cffi
-Version:        1.5.2
+Version:        1.6.0
 Release:        0
 Summary:        Foreign Function Interface for Python calling C code
 License:        MIT
 Group:          Development/Languages/Python
 Url:            http://cffi.readthedocs.org
-Source0:        
https://pypi.python.org/packages/source/c/cffi/cffi-%{version}.tar.gz
+Source0:        https://pypi.io/packages/source/c/cffi/cffi-%{version}.tar.gz
 Source1:        python-cffi-rpmlintrc
+# PATCH-FIX-UPSTREAM python-cffi-avoid-bitshifting-negative-int.patch 
boo#981848 badshah...@gmail.com -- Use bitwise AND instead of bitshifts to test 
for integer types; patch submitted upstream
+Patch0:         python-cffi-avoid-bitshifting-negative-int.patch
 BuildRequires:  gcc-c++
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
@@ -47,6 +49,7 @@
 
 %prep
 %setup -q -n cffi-%{version}
+%patch0 -p1
 
 %build
 CFLAGS="%{optflags}" python setup.py build

++++++ cffi-1.5.2.tar.gz -> cffi-1.6.0.tar.gz ++++++
++++ 3181 lines of diff (skipped)

++++++ python-cffi-avoid-bitshifting-negative-int.patch ++++++
# HG changeset patch
# User Armin Rigo <ar...@tunes.org>
# Date 1464590378 -7200
# Node ID bc14c64da0f41ba70f6fab821540b376f78e0a85
# Parent  f6d4b0a1e70b885352de186fcaeedf41365793c6
Issue #260: don't use "x << 0" but "x | 0" to check that x is an
integer.  It seems that "x << 0" is undefined, according to the C
standard, if x is any negative value...

diff --git a/cffi/recompiler.py b/cffi/recompiler.py
--- a/cffi/recompiler.py
+++ b/cffi/recompiler.py
@@ -814,7 +814,7 @@
             try:
                 if ftype.is_integer_type() or fbitsize >= 0:
                     # accept all integers, but complain on float or double
-                    prnt("  (void)((p->%s) << 1);  /* check that '%s.%s' is "
+                    prnt("  (void)((p->%s) | 0);  /* check that '%s.%s' is "
                          "an integer */" % (fname, cname, fname))
                     continue
                 # only accept exactly the type declared, except that '[]'
@@ -991,7 +991,7 @@
             prnt('static int %s(unsigned long long *o)' % funcname)
             prnt('{')
             prnt('  int n = (%s) <= 0;' % (name,))
-            prnt('  *o = (unsigned long long)((%s) << 0);'
+            prnt('  *o = (unsigned long long)((%s) | 0);'
                  '  /* check that %s is an integer */' % (name, name))
             if check_value is not None:
                 if check_value > 0:
@@ -1250,7 +1250,7 @@
 
     def _emit_bytecode_UnknownIntegerType(self, tp, index):
         s = ('_cffi_prim_int(sizeof(%s), (\n'
-             '           ((%s)-1) << 0 /* check that %s is an integer type 
*/\n'
+             '           ((%s)-1) | 0 /* check that %s is an integer type */\n'
              '         ) <= 0)' % (tp.name, tp.name, tp.name))
         self.cffi_types[index] = CffiOp(OP_PRIMITIVE, s)
 

Reply via email to