[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2017-04-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, Alex and thanks for the PRs, Louie! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2017-04-26 Thread Berker Peksag
Berker Peksag added the comment: New changeset c7b8367076dc7771dabcb9491bd98218c788d489 by Berker Peksag (Louie Lu) in branch '3.5': bpo-28698: Fix c_wchar_p doc example (GH-1160) https://github.com/python/cpython/commit/c7b8367076dc7771dabcb9491bd98218c788d489 --

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2017-04-26 Thread Berker Peksag
Berker Peksag added the comment: New changeset 9f6828119df23fca9e799f47e02baabe87adca2a by Berker Peksag (Louie Lu) in branch '3.6': bpo-28698: Fix c_wchar_p doc example (GH-1160) https://github.com/python/cpython/commit/9f6828119df23fca9e799f47e02baabe87adca2a --

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2017-04-26 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1399 ___ Python tracker ___ ___ Python-bugs-list

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2017-04-26 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1398 ___ Python tracker ___ ___ Python-bugs-list

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2017-04-26 Thread Berker Peksag
Berker Peksag added the comment: New changeset 0d637e236d7099f7b724026c8cb7bd83d8e12e6b by Berker Peksag (Louie Lu) in branch 'master': bpo-28698: Fix c_wchar_p doc example (GH-1160) https://github.com/python/cpython/commit/0d637e236d7099f7b724026c8cb7bd83d8e12e6b -- nosy:

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2017-04-19 Thread Berker Peksag
Changes by Berker Peksag : -- stage: needs patch -> patch review ___ Python tracker ___

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2017-04-15 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1289 ___ Python tracker ___ ___ Python-bugs-list

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Changes by Eryk Sun : -- Removed message: http://bugs.python.org/msg280878 ___ Python tracker ___

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Eryk Sun added the comment: The issue tracker isn't a forum to answer general programming questions. Please ask this on python-list, and I'll try to help you there. -- ___ Python tracker

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Alex Wang
Alex Wang added the comment: Hi Eryk, Thanks a lot for quick reply~ This is about the bug I filed: http://bugs.python.org/issue28698# I may still need your help to have a look the original case when I caught this issue: ​I am writing some test automation which call C DLL from Python, the C

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Changes by Eryk Sun : -- keywords: +easy stage: -> needs patch ___ Python tracker ___

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Eryk Sun added the comment: The repr can't automatically dereference the string at the address because it may be an invalid pointer. ctypes was developed on Windows, for which, in Python 2, it (ab)uses the obsolete IsBadStringPtr[A|W] function [1]. This function should never be used in a

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Alex Wang
New submission from Alex Wang: - Python Version Python 3.5.2 - Issue I found that the c_wchar_p and c_char_p return results behaves different from what it is based on ctypes doc. From the ctypes doc of Python 3.5: >>> c_wchar_p("Hello, World") c_wchar_p('Hello, World') It return the ctypes