This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 在ctypes里调用C库返回c_char_p类型时的问题
Type: Stage:
Components: ctypes Versions: Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: anthonypjshaw, fy2099
Priority: normal Keywords:

Created on 2019-05-11 04:04 by fy2099, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg342155 - (view) Author: 午夜之风 (fy2099) Date: 2019-05-11 04:04
在ctypes里调用C库返回c_char_p类型时 出现当字符串中包含 \0 时只能获取到\0前的字符串的问题
msg342162 - (view) Author: anthony shaw (anthonypjshaw) * (Python triager) Date: 2019-05-11 05:55
"When the C library is called in ctypes to return the c_char_p type, the problem that only the string before \0 can be obtained when the string contains \\0"

This function is specifically for null-terminated strings (\0), please could you be more specific about the expected behaviour and why this is a bug?

https://docs.python.org/2/library/ctypes.html#ctypes.c_char_p
History
Date User Action Args
2022-04-11 14:59:15adminsetgithub: 81063
2019-05-11 07:02:48SilentGhostlinkissue36883 superseder
2019-05-11 05:55:05anthonypjshawsetnosy: + anthonypjshaw
messages: + msg342162
2019-05-11 04:04:21fy2099create