File: cython3.patch

package info (click to toggle)
obitools 3.0.1~b26%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,788 kB
  • sloc: ansic: 24,299; python: 657; sh: 27; makefile: 20
file content (57 lines) | stat: -rw-r--r-- 2,095 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Description: fix build failure with cython3.
 This patch fixes failures to make use of the python2 specific type
 converter PyInt_FromLong by replacing it by PyLong_FromLong, from a
 file shipped by the final versions of cython3.
Author: Étienne Mollier <emollier@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1119752
Forwarded: no
Last-Update: 2025-11-04
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- obitools.orig/python/obitools3/dms/column/typed_column/int.pyx
+++ obitools/python/obitools3/dms/column/typed_column/int.pyx
@@ -24,7 +24,7 @@
                                   OBITuple_NA, \
                                   obiint_t
 
-from cpython.int cimport PyInt_FromLong
+from cpython.long cimport PyLong_FromLong
 
 from libc.stdint cimport int32_t
 
@@ -59,7 +59,7 @@
         if value == OBIInt_NA :
             result = None
         else :
-            result = PyInt_FromLong(value)
+            result = PyLong_FromLong(value)
         return result
     
     
@@ -87,7 +87,7 @@
         if value == OBIInt_NA :
             result = None
         else :
-            result = PyInt_FromLong(value)
+            result = PyLong_FromLong(value)
         return result
     
     cpdef object get_line(self, index_t line_nb) :
@@ -109,7 +109,7 @@
             value = obi_get_int_with_elt_idx_and_col_p_in_view(view_p, column_p, line_nb, i)
             obi_errno_to_exception(line_nb=line_nb, elt_id=i, error_message="Problem getting a value from a column")
             if value != OBIInt_NA :
-                value_in_result = PyInt_FromLong(value)
+                value_in_result = PyLong_FromLong(value)
                 result[elements_names[i]] = value_in_result
                 if all_NA :
                     all_NA = False
@@ -152,7 +152,7 @@
 
         for i in range(value_length) :
             value = array[i]
-            value_in_result = PyInt_FromLong(value)
+            value_in_result = PyLong_FromLong(value)
             result.append(value_in_result)
         
         return tuple(result)