Skip to content

Commit

Permalink
sagemathgh-36925: src/sage/calculus/ode.pyx: constness fix for clang 16
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
- Fixes part of sagemath#36840

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36925
Reported by: Matthias Köppe
Reviewer(s): Travis Scrimshaw
  • Loading branch information
Release Manager committed Dec 25, 2023
2 parents 980aa72 + dec6604 commit 2c4688f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/sage/calculus/ode.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ cdef class PyFunctionWrapper:
self.y_n = x

cdef class ode_system:
cdef int c_j(self,double t, double *y, double *dfdy,double *dfdt) noexcept: #void *params):
cdef int c_j(self, double t, double *y, double *dfdy, double *dfdt) noexcept:
return 0

cdef int c_f(self,double t, double* y, double* dydt) noexcept: #void *params):
cdef int c_f(self, double t, double* y, double* dydt) noexcept:
return 0

cdef int c_jac_compiled(double t, double *y, double *dfdy,double *dfdt, void * params) noexcept:
cdef int c_jac_compiled(double t, const double *y, double *dfdy, double *dfdt, void *params) noexcept:
cdef int status
cdef ode_system wrapper
wrapper = <ode_system> params
status = wrapper.c_j(t,y,dfdy,dfdt) #Could add parameters
status = wrapper.c_j(t, y, dfdy, dfdt) # Could add parameters
return status

cdef int c_f_compiled(double t, double *y, double *dydt, void *params) noexcept:
cdef int c_f_compiled(double t, const double *y, double *dydt, void *params) noexcept:
cdef int status
cdef ode_system wrapper
wrapper = <ode_system> params
status = wrapper.c_f(t,y,dydt) #Could add parameters
status = wrapper.c_f(t, y, dydt) # Could add parameters
return status

cdef int c_jac(double t,double *y,double *dfdy,double *dfdt,void *params) noexcept:
cdef int c_jac(double t, const double *y, double *dfdy, double *dfdt, void *params) noexcept:
cdef int i
cdef int j
cdef int y_n
Expand All @@ -84,7 +84,7 @@ cdef int c_jac(double t,double *y,double *dfdy,double *dfdt,void *params) noexce
except Exception:
return -1

cdef int c_f(double t,double* y, double* dydt,void *params) noexcept:
cdef int c_f(double t, const double *y, double *dydt, void *params) noexcept:
cdef int i
cdef int y_n
cdef int param_n
Expand Down

0 comments on commit 2c4688f

Please sign in to comment.