From b297babacb8a74e899ce5d44c3e277083416d7a5 Mon Sep 17 00:00:00 2001 From: Lassi Pulkkinen Date: Wed, 2 Oct 2024 01:19:26 +0300 Subject: [PATCH] Fix off-by-one error in documentation for xcb_*_end When rem=0, data is a one-past-the-end pointer. This is the correct behavior for code like: for (; formats.rem; xcb_format_next(&formats)) ... --- src/c_client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/c_client.py b/src/c_client.py index b7db543..c16d90c 100644 --- a/src/c_client.py +++ b/src/c_client.py @@ -1626,13 +1626,13 @@ def _c_iterator(self, name): _h('') _h('/**') - _h(' * Return the iterator pointing to the last element') + _h(' * Return the iterator pointing to the position after the last element') _h(' * @param i An %s', self.c_iterator_type) - _h(' * @return The iterator pointing to the last element') + _h(' * @return The iterator pointing to the position after the last element') _h(' *') - _h(' * Set the current element in the iterator to the last element.') - _h(' * The member rem is set to 0. The member data points to the') - _h(' * last element.') + _h(' * Set the iterator to point to the position after the last') + _h(' * element. The member rem is set to 0. The member data points') + _h(' * to the position after the last element.') _h(' */') _c('') _hc('xcb_generic_iterator_t')