[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-05 Thread Marcin Kowalczyk
Marcin Kowalczyk added the comment: Thank you! This means that I can continue to use PyUnicode_AsUTF8AndSize() without worries: https://github.com/google/riegeli/commit/17ab36bfdd6cc55f37cfbb729bd43c9cbff4cd22 -- ___ Python tracker

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread miss-islington
miss-islington added the comment: New changeset b0b01811bb28d3d6c70846e47fa2f6ba03ed03f1 by Miss Islington (bot) in branch '3.9': bpo-35295: Remove outdated comment. (GH-24453) https://github.com/python/cpython/commit/b0b01811bb28d3d6c70846e47fa2f6ba03ed03f1 --

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +23254 pull_request: https://github.com/python/cpython/pull/24454 ___ Python tracker

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Inada Naoki added the comment: New changeset d938816acf71a74f1bd13fdf0534b3d9ea962e44 by Inada Naoki in branch 'master': bpo-35295: Remove outdated comment. (GH-24453) https://github.com/python/cpython/commit/d938816acf71a74f1bd13fdf0534b3d9ea962e44 --

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +23253 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24453 ___ Python tracker ___

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Inada Naoki added the comment: > 1a. Declare both functions equally acceptable. Remove comments claiming that > PyUnicode_AsUTF8AndSize() should be avoided. > > 1b. 1a, and change the implementation of PyUnicode_AsUTF8AndSize() to avoid > allocating the string twice if it needs to be

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2018-11-23 Thread INADA Naoki
Change by INADA Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2018-11-22 Thread Marcin Kowalczyk
New submission from Marcin Kowalczyk : The documentation is silent whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred. We are under the assumption that both are acceptable for the given caller, i.e. the caller wants to access just the sequence of UTF-8 code units