[Python-apps-commits] r12801 - in packages/cython/trunk/debian (3 files)

yoh at users.alioth.debian.org yoh at users.alioth.debian.org
Fri Feb 19 18:20:22 UTC 2016


    Date: Friday, February 19, 2016 @ 18:20:21
  Author: yoh
Revision: 12801

added guess_longness.patch from usptream to fix failed tests on i386

Added:
  packages/cython/trunk/debian/patches/guess_longness.patch
Modified:
  packages/cython/trunk/debian/changelog
  packages/cython/trunk/debian/patches/series

Modified: packages/cython/trunk/debian/changelog
===================================================================
--- packages/cython/trunk/debian/changelog	2016-02-19 18:20:16 UTC (rev 12800)
+++ packages/cython/trunk/debian/changelog	2016-02-19 18:20:21 UTC (rev 12801)
@@ -1,7 +1,7 @@
 cython (0.23.2+git16-ga8fbae1-1) unstable; urgency=medium
 
   * Fresh upstream snapshot
-    - fixes problems detected with failed tests across some platforms
+    - added guess_longness.patch from usptream to fix failed tests on i386
       (Closes: #799364)
 
  -- Yaroslav Halchenko <debian at onerussian.com>  Wed, 23 Sep 2015 10:09:17 -0400

Added: packages/cython/trunk/debian/patches/guess_longness.patch
===================================================================
--- packages/cython/trunk/debian/patches/guess_longness.patch	                        (rev 0)
+++ packages/cython/trunk/debian/patches/guess_longness.patch	2016-02-19 18:20:21 UTC (rev 12801)
@@ -0,0 +1,21 @@
+diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
+index 2984215..230cf47 100644
+--- a/Cython/Compiler/ExprNodes.py
++++ b/Cython/Compiler/ExprNodes.py
+@@ -1238,7 +1238,15 @@ class IntNode(ConstNode):
+             self.result_code = self.get_constant_c_result_code()
+ 
+     def get_constant_c_result_code(self):
+-        return self.value_as_c_integer_string() + self.unsigned + self.longness
++        unsigned, longness = self.unsigned, self.longness
++        literal = self.value_as_c_integer_string()
++        if not (unsigned or longness) and self.type.is_int and literal[0] == '-' and literal[1] != '0':
++            # negative decimal literal => guess longness from type to prevent wrap-around
++            if self.type.rank >= PyrexTypes.c_longlong_type.rank:
++                longness = 'LL'
++            elif self.type.rank >= PyrexTypes.c_long_type.rank:
++                longness = 'L'
++        return literal + unsigned + longness
+ 
+     def value_as_c_integer_string(self):
+         value = self.value

Modified: packages/cython/trunk/debian/patches/series
===================================================================
--- packages/cython/trunk/debian/patches/series	2016-02-19 18:20:16 UTC (rev 12800)
+++ packages/cython/trunk/debian/patches/series	2016-02-19 18:20:21 UTC (rev 12801)
@@ -1 +1,2 @@
 deb_disable_googleanalytics
+guess_longness.patch




More information about the Python-apps-commits mailing list