diff options
author | Campbell Barton <campbell@blender.org> | 2022-11-08 04:03:38 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-11-08 04:16:28 +0300 |
commit | 8f439bdc2de1f964c8037448796a3f03a9cce4fe (patch) | |
tree | 219660e15c6b58c1433f783bb25e70a732902a84 /source/blender/freestyle | |
parent | 1140e001a07b7912debbd3166d61f77499b60158 (diff) |
Fix invalid function signatures for PySequenceMethods callbacks
Function casts hid casting between potentially incompatible type
signatures (using int instead of Py_ssize_t). As it happens this seems
not to have caused any bugs on supported platforms so this change is
mainly for correctness and to avoid problems in the future.
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r-- | source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp | 2 | ||||
-rw-r--r-- | source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index f73c4a8fed5..bf527673f36 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -89,7 +89,7 @@ static Py_ssize_t FEdge_sq_length(BPy_FEdge * /*self*/) return 2; } -static PyObject *FEdge_sq_item(BPy_FEdge *self, int keynum) +static PyObject *FEdge_sq_item(BPy_FEdge *self, Py_ssize_t keynum) { if (keynum < 0) { keynum += FEdge_sq_length(self); diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 6f90406d74d..3e7d4fd9e1c 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -74,7 +74,7 @@ static Py_ssize_t Stroke_sq_length(BPy_Stroke *self) return self->s->strokeVerticesSize(); } -static PyObject *Stroke_sq_item(BPy_Stroke *self, int keynum) +static PyObject *Stroke_sq_item(BPy_Stroke *self, Py_ssize_t keynum) { if (keynum < 0) { keynum += Stroke_sq_length(self); |