-
-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow more rings to be used with libsingular & rework signal detection system #39075
Changes from all commits
2e88a31
88bb995
6708419
0764f29
3aeab0e
f85e291
75a21e6
abf390e
f17d296
fabaea2
287cb94
2365428
282d52e
55b698f
f6c5a14
6555f37
10b31b3
963dde6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ from sage.rings.polynomial.multi_polynomial_sequence import PolynomialSequence_g | |
from sage.libs.singular.decl cimport * | ||
from sage.libs.singular.option import opt_ctx | ||
from sage.libs.singular.polynomial cimport singular_vector_maximal_component | ||
from sage.libs.singular.singular cimport sa2si, si2sa, si2sa_intvec, si2sa_bigintvec | ||
from sage.libs.singular.singular cimport sa2si, si2sa, si2sa_intvec, si2sa_bigintvec, start_catch_error, check_error | ||
from sage.libs.singular.singular import error_messages | ||
|
||
from sage.interfaces.singular import get_docstring | ||
|
@@ -1450,10 +1450,8 @@ EXAMPLES:: | |
|
||
cdef inline call_function(SingularFunction self, tuple args, object R, bint signal_handler=True, attributes=None): | ||
global currRingHdl | ||
global errorreported | ||
global currentVoice | ||
global myynest | ||
global error_messages | ||
|
||
cdef ring *si_ring | ||
if isinstance(R, MPolynomialRing_libsingular): | ||
|
@@ -1474,29 +1472,28 @@ cdef inline call_function(SingularFunction self, tuple args, object R, bint sign | |
|
||
currentVoice = NULL | ||
myynest = 0 | ||
errorreported = 0 | ||
|
||
while error_messages: | ||
error_messages.pop() | ||
start_catch_error() | ||
|
||
with opt_ctx: # we are preserving the global options state here | ||
if signal_handler: | ||
sig_on() | ||
_res = self.call_handler.handle_call(argument_list, si_ring) | ||
sig_off() | ||
try: | ||
sig_on() | ||
_res = self.call_handler.handle_call(argument_list, si_ring) | ||
sig_off() | ||
finally: | ||
s = check_error() | ||
else: | ||
_res = self.call_handler.handle_call(argument_list, si_ring) | ||
s = check_error() | ||
|
||
if myynest: | ||
myynest = 0 | ||
myynest = 0 | ||
|
||
if currentVoice: | ||
currentVoice = NULL | ||
Comment on lines
1491
to
1492
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could not find any use of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No idea, but given the naming, my best guess is "who is speaking to Singular" i.e. "where is Singular taking commands from". The example has |
||
|
||
if errorreported: | ||
errorreported = 0 | ||
if s: | ||
raise RuntimeError("error in Singular function call %r:\n%s" % | ||
(self._name, "\n".join(error_messages))) | ||
(self._name, "\n".join(s))) | ||
|
||
res = argument_list.to_python(_res) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a more descriptive name, e.g.,
e
, orerror
, instead ofs
would be good?