classification
Title: Py_UNICODE_* functions are undocumented
Type: Stage: needs patch
Components: Documentation Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Document unicode C-API in reST
View: 10435
Assigned To: docs@python Nosy List: belopolsky, docs@python, ncoghlan, stutzbach, terry.reedy, vstinner
Priority: normal Keywords:

Created on 2010-05-07 16:48 by stutzbach, last changed 2010-11-16 16:23 by belopolsky. This issue is now closed.

Messages (4)
msg105214 - (view) Author: Daniel Stutzbach (stutzbach) (Python committer) Date: 2010-05-07 16:48
Python provides several functions for manipulating raw Py_UNICODE strings, but they aren't documented.  Below are their signatures.

PyAPI_FUNC(size_t) Py_UNICODE_strlen(const Py_UNICODE *u);

PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strcpy(
    Py_UNICODE *s1, const Py_UNICODE *s2);

PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strncpy(
    Py_UNICODE *s1, const Py_UNICODE *s2, size_t n);

PyAPI_FUNC(int) Py_UNICODE_strcmp(
    const Py_UNICODE *s1, const Py_UNICODE *s2);

PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strchr(
    const Py_UNICODE *s, Py_UNICODE c
    );
msg105732 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-05-14 18:11
If, for this and your previous two issues, you could add a suggestion as to precisely where you would make an addition and what minimally adequate text you would add (even unformatted ascii text in a message) that is consistent with surrounding style, action would likely happen sooner.
msg115435 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2010-09-03 10:52
For this one, I suggest adding something to http://docs.python.org/dev/c-api/unicode.html#plain-py-unicode
msg121303 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-11-16 16:23
There are more undocumented functions in unicode.h.  It makes sense to fix all of them in one patch.  Closing this as superseded by #10435.
History
Date User Action Args
2010-11-16 16:23:15belopolskysetstatus: open -> closed

nosy: + belopolsky
messages: + msg121303

superseder: Document unicode C-API in reST
resolution: duplicate
2010-09-03 10:52:18ncoghlansetnosy: + ncoghlan
messages: + msg115435
2010-05-14 20:03:37terry.reedysetversions: + Python 2.6, Python 3.1
2010-05-14 18:11:11terry.reedysetnosy: + terry.reedy
messages: + msg105732
2010-05-13 01:10:37vstinnersetnosy: + vstinner
2010-05-07 16:48:39stutzbachcreate