mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Update to sagemath 6.5
This commit is contained in:
parent
48c70ab672
commit
baae9bd2a8
23 changed files with 299 additions and 174 deletions
|
@ -1,6 +1,68 @@
|
|||
diff -up src/sage/libs/pari/decl.pxi.orig src/sage/libs/pari/decl.pxi
|
||||
--- src/sage/libs/pari/decl.pxi.orig 2015-04-03 17:09:59.840683372 -0300
|
||||
+++ src/sage/libs/pari/decl.pxi 2015-04-03 17:10:10.876683795 -0300
|
||||
@@ -165,7 +165,6 @@ cdef extern from 'parisage.h':
|
||||
extern int new_galois_format, precdl
|
||||
# The "except 0" here is to ensure compatibility with
|
||||
# _pari_err_handle() in handle_error.pyx
|
||||
- extern int (*cb_pari_err_handle)(GEN) except 0
|
||||
extern int (*cb_pari_handle_exception)(long) except 0
|
||||
extern void (*cb_pari_err_recover)(long)
|
||||
|
||||
@@ -3757,6 +3756,3 @@ cdef extern from 'pari/paripriv.h':
|
||||
unsigned long flags
|
||||
|
||||
extern gp_data* GP_DATA
|
||||
-
|
||||
-cdef extern from 'pari/anal.h':
|
||||
- char* closure_func_err()
|
||||
diff -up src/sage/libs/pari/handle_error.pyx.orig src/sage/libs/pari/handle_error.pyx
|
||||
--- src/sage/libs/pari/handle_error.pyx.orig 2015-04-03 17:09:59.842683372 -0300
|
||||
+++ src/sage/libs/pari/handle_error.pyx 2015-04-03 17:10:10.876683795 -0300
|
||||
@@ -131,13 +131,13 @@ cdef void _pari_init_error_handling():
|
||||
sage: pari('warning("test")')
|
||||
*** user warning: test
|
||||
"""
|
||||
- global cb_pari_err_handle
|
||||
+ global cb_pari_handle_exception
|
||||
global cb_pari_err_recover
|
||||
- cb_pari_err_handle = _pari_err_handle
|
||||
+ cb_pari_handle_exception = _pari_handle_exception
|
||||
cb_pari_err_recover = _pari_err_recover
|
||||
|
||||
|
||||
-cdef int _pari_err_handle(GEN E) except 0:
|
||||
+cdef int _pari_handle_exception(long errnum_unused) except 0:
|
||||
"""
|
||||
Convert a PARI error into a Sage exception, unless the error was
|
||||
a stack overflow, in which case we enlarge the stack.
|
||||
@@ -156,6 +156,7 @@ cdef int _pari_err_handle(GEN E) except
|
||||
PariError: impossible inverse in gdiv: 0
|
||||
|
||||
"""
|
||||
+ cdef GEN E = pari_err_last()
|
||||
cdef long errnum = E[1]
|
||||
if errnum == e_STACK:
|
||||
# PARI is out of memory. We double the size of the PARI stack
|
||||
@@ -165,15 +166,10 @@ cdef int _pari_err_handle(GEN E) except
|
||||
|
||||
sig_block()
|
||||
cdef char* errstr
|
||||
- cdef char* s
|
||||
try:
|
||||
errstr = pari_err2str(E)
|
||||
pari_error_string = errstr.decode('ascii')
|
||||
|
||||
- s = closure_func_err()
|
||||
- if s is not NULL:
|
||||
- pari_error_string = s.decode('ascii') + ": " + pari_error_string
|
||||
-
|
||||
raise PariError(errnum, pari_error_string, pari_instance.new_gen_noclear(E))
|
||||
finally:
|
||||
pari_free(errstr)
|
||||
diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_instance.pxd
|
||||
--- src/sage/libs/pari/pari_instance.pxd.orig 2014-11-18 15:25:03.591127791 -0200
|
||||
+++ src/sage/libs/pari/pari_instance.pxd 2014-11-18 15:25:18.999127995 -0200
|
||||
--- src/sage/libs/pari/pari_instance.pxd.orig 2015-04-03 17:09:59.834683372 -0300
|
||||
+++ src/sage/libs/pari/pari_instance.pxd 2015-04-03 17:10:10.874683795 -0300
|
||||
@@ -6,6 +6,10 @@ cimport cython
|
||||
|
||||
from sage.libs.pari.gen cimport gen
|
||||
|
@ -13,9 +75,9 @@ diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_insta
|
|||
|
||||
@cython.final
|
||||
diff -up src/sage/libs/pari/pari_instance.pyx.orig src/sage/libs/pari/pari_instance.pyx
|
||||
--- src/sage/libs/pari/pari_instance.pyx.orig 2014-11-18 15:25:16.287127959 -0200
|
||||
+++ src/sage/libs/pari/pari_instance.pyx 2014-11-18 15:25:19.000127995 -0200
|
||||
@@ -437,7 +437,12 @@ cdef class PariInstance(sage.structure.p
|
||||
--- src/sage/libs/pari/pari_instance.pyx.orig 2015-04-03 17:09:59.835683372 -0300
|
||||
+++ src/sage/libs/pari/pari_instance.pyx 2015-04-03 17:10:10.874683795 -0300
|
||||
@@ -417,7 +417,12 @@ cdef class PariInstance(sage.structure.p
|
||||
# The size here doesn't really matter, because we will allocate
|
||||
# our own stack anyway. We ask PARI not to set up signal and
|
||||
# error handlers.
|
||||
|
@ -28,3 +90,13 @@ diff -up src/sage/libs/pari/pari_instance.pyx.orig src/sage/libs/pari/pari_insta
|
|||
|
||||
_pari_init_error_handling()
|
||||
|
||||
diff -up src/sage/libs/pari/handle_error.pxd.orig src/sage/libs/pari/handle_error.pxd
|
||||
--- src/sage/libs/pari/handle_error.pxd.orig 2015-04-03 17:14:16.506693201 -0300
|
||||
+++ src/sage/libs/pari/handle_error.pxd 2015-04-03 17:14:44.287694265 -0300
|
||||
@@ -1,5 +1,5 @@
|
||||
include 'sage/libs/pari/decl.pxi'
|
||||
|
||||
cdef void _pari_init_error_handling()
|
||||
-cdef int _pari_err_handle(GEN E) except 0
|
||||
+cdef int _pari_handle_exception(long errnum_unused) except 0
|
||||
cdef void _pari_err_recover(long errnum)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue