summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMax Bachmann <kontakt@maxbachmann.de>2022-09-18 10:06:40 +0200
committerGitHub <noreply@github.com>2022-09-18 09:06:40 +0100
commite0dda4555d1a1fae9d3f5ffc91e601710f7a7744 (patch)
treecfe1eba480a2279c02296350c5e2af85a7fbb9b3 /docs
parent490d3ebaf17fb3ad369cfd913d31de902324f184 (diff)
downloadcython-e0dda4555d1a1fae9d3f5ffc91e601710f7a7744.tar.gz
Fix incorrect operator lookup for postincrement (#4536)
Fix incorrect operator lookup for postincrement. Before this Cython always called the c++ "preincrement" operator.
Diffstat (limited to 'docs')
-rw-r--r--docs/src/userguide/migrating_to_cy30.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/src/userguide/migrating_to_cy30.rst b/docs/src/userguide/migrating_to_cy30.rst
index 50b0b6734..292a2e943 100644
--- a/docs/src/userguide/migrating_to_cy30.rst
+++ b/docs/src/userguide/migrating_to_cy30.rst
@@ -226,3 +226,16 @@ To make it easier to handle cases where your interpretation of type
annotations differs from Cython's, Cython 3 now supports setting the
``annotation_typing`` :ref:`directive <compiler-directives>` on a
per-class or per-function level.
+
+C++ postincrement/postdecrement operator
+========================================
+
+Cython 3 differentiates between pre/post-increment and pre/post-decrement
+operators (Cython 0.29 implemented both as pre(in/de)crement operator).
+This only has an effect when using ``cython.operator.postdecrement`` / ``cython.operator.postincrement``.
+When running into an error it is required to add the corresponding operator::
+
+ cdef cppclass Example:
+ Example operator++(int)
+ Example operator--(int)
+