mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Update to sagemath 7.5.1
This commit is contained in:
parent
ac3aa7f6b7
commit
056e08d023
24 changed files with 481 additions and 439 deletions
|
@ -1,77 +1,24 @@
|
|||
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 2016-10-20 08:06:47.720535139 -0400
|
||||
+++ src/sage/libs/pari/handle_error.pxd 2016-10-20 08:07:01.459535665 -0400
|
||||
@@ -1,5 +1,5 @@
|
||||
from .types cimport GEN
|
||||
diff -up src/sage/libs/cypari2/paridecl.pxd.orig src/sage/libs/cypari2/paridecl.pxd
|
||||
--- src/sage/libs/cypari2/paridecl.pxd.orig 2017-03-04 14:37:56.976639516 -0500
|
||||
+++ src/sage/libs/cypari2/paridecl.pxd 2017-03-04 14:38:09.953640013 -0500
|
||||
@@ -77,7 +77,7 @@ cdef extern from "sage/libs/cypari2/cypa
|
||||
int PARI_SIGINT_block, PARI_SIGINT_pending
|
||||
void NEXT_PRIME_VIADIFF(long, byteptr)
|
||||
void PREC_PRIME_VIADIFF(long, byteptr)
|
||||
- int INIT_JMPm, INIT_SIGm, INIT_DFTm, INIT_noPRIMEm, INIT_noIMTm
|
||||
+ int INIT_JMPm, INIT_SIGm, INIT_DFTm, INIT_noPRIMEm, INIT_noIMTm, INIT_noINTGMPm
|
||||
int new_galois_format, factor_add_primes, factor_proven
|
||||
int precdl
|
||||
# The "except 0" here is to ensure compatibility with
|
||||
diff -up src/sage/libs/cypari2/pari_instance.pyx.orig src/sage/libs/cypari2/pari_instance.pyx
|
||||
--- src/sage/libs/cypari2/pari_instance.pyx.orig 2017-03-04 14:38:30.535640801 -0500
|
||||
+++ src/sage/libs/cypari2/pari_instance.pyx 2017-03-04 14:38:39.680641151 -0500
|
||||
@@ -510,7 +510,7 @@ cdef class PariInstance(PariInstance_aut
|
||||
# As a simple heuristic, we set the virtual stack to 1/4 of the
|
||||
# virtual memory.
|
||||
|
||||
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)
|
||||
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 2016-10-20 08:07:12.336536082 -0400
|
||||
+++ src/sage/libs/pari/handle_error.pyx 2016-10-20 08:08:23.089538791 -0400
|
||||
@@ -139,7 +139,7 @@ cdef void _pari_init_error_handling():
|
||||
cb_pari_err_recover = _pari_err_recover
|
||||
- pari_init_opts(size, maxprime, INIT_DFTm)
|
||||
+ pari_init_opts(size, maxprime, INIT_DFTm|INIT_noINTGMPm)
|
||||
|
||||
|
||||
-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.
|
||||
@@ -158,11 +158,11 @@ 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]
|
||||
|
||||
sig_block()
|
||||
cdef char* errstr
|
||||
- cdef char* s
|
||||
try:
|
||||
if errnum == e_STACK:
|
||||
# Custom error message for PARI stack overflow
|
||||
@@ -173,11 +173,6 @@ cdef int _pari_err_handle(GEN E) except
|
||||
errstr = pari_err2str(E)
|
||||
pari_error_string = errstr.decode('ascii')
|
||||
pari_free(errstr)
|
||||
-
|
||||
- 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:
|
||||
sig_unblock()
|
||||
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 2016-10-20 08:08:33.152539177 -0400
|
||||
+++ src/sage/libs/pari/pari_instance.pxd 2016-10-20 08:08:51.209539868 -0400
|
||||
@@ -5,6 +5,10 @@ cimport cython
|
||||
|
||||
from sage.libs.pari.gen cimport gen
|
||||
|
||||
+cdef extern from "gmp.h":
|
||||
+ cdef void mp_get_memory_functions(void**, void**, void**)
|
||||
+ cdef void mp_set_memory_functions(void*, void*, void*)
|
||||
+
|
||||
cpdef long prec_bits_to_words(unsigned long prec_in_bits)
|
||||
cpdef long prec_words_to_bits(long prec_in_words)
|
||||
cpdef long default_bitprec()
|
||||
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 2016-10-20 08:09:05.632540421 -0400
|
||||
+++ src/sage/libs/pari/pari_instance.pyx 2016-10-20 08:10:25.322543472 -0400
|
||||
@@ -475,7 +475,12 @@ cdef class PariInstance(PariInstance_aut
|
||||
from sage.misc.memory_info import MemoryInfo
|
||||
mem = MemoryInfo()
|
||||
|
||||
+ cdef void *_gmp_malloc
|
||||
+ cdef void *_gmp_realloc
|
||||
+ cdef void *_gmp_free
|
||||
+ mp_get_memory_functions(&_gmp_malloc, &_gmp_realloc, &_gmp_free)
|
||||
pari_init_opts(size, maxprime, INIT_DFTm)
|
||||
+ mp_set_memory_functions(_gmp_malloc, _gmp_realloc, _gmp_free)
|
||||
|
||||
sizemax = mem.virtual_memory_limit() // 4
|
||||
from sage.misc.getusage import virtual_memory_limit
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue