[issue10435] Document unicode C-API in reST

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: This is a duplicate of issue 1944. -- nosy: +berker.peksag resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Document PyUnicode_* API ___ Python tracker

[issue10435] Document unicode C-API in reST

2015-05-03 Thread Mark Lawrence
Mark Lawrence added the comment: Py_UNICODE_TOLOWER, Py_UNICODE_TOUPPER and Py_UNICODE_TOTITLE are all labelled deprecated in 3.3 and presumably can be removed completely. Alternatively should these like many others be scheduled for removal in 4.0? --

[issue10435] Document unicode C-API in reST

2015-04-30 Thread Mark Lawrence
Mark Lawrence added the comment: List of just about everything that's in the header file but not in the rst file as I'm not sure which bits you normally wouldn't bother with. Py_USING_UNICODE Py_UNICODE_SIZE Py_UNICODE_WIDE Py_UNICODE_COPY Py_UNICODE_FILL Py_UNICODE_HIGH_SURROGATE

[issue10435] Document unicode C-API in reST

2015-04-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sorry for the broken link, the correct header file is Include/unicodeobject.h -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10435 ___

[issue10435] Document unicode C-API in reST

2015-04-21 Thread Mark Lawrence
Mark Lawrence added the comment: Okay Alexander I'll give it a go, but not tonight :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10435 ___

[issue10435] Document unicode C-API in reST

2015-04-21 Thread Mark Lawrence
Mark Lawrence added the comment: I've looked at c-api/unicode.rst and I can't see any correlation between it and the names listed here in msg121302. So either this was never completed or it's been all change in the mean time, so could somebody take a look please. -- nosy:

[issue10435] Document unicode C-API in reST

2015-04-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark, Unicode C-APIs have changed a lot since this issue was opened, but I think many of the listed functions are still present but not properly documented. You can help by checking the Include/unicode.h file and compiling a list of functions that are

[issue10435] Document unicode C-API in reST

2010-11-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Nov 17, 2010 at 5:20 PM, Marc-Andre Lemburg rep...@bugs.python.org wrote: .. -/* Encodes a Unicode object and returns the

[issue10435] Document unicode C-API in reST

2010-11-22 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Nov 17, 2010 at 5:20 PM, Marc-Andre Lemburg rep...@bugs.python.org wrote: .. -/* Encodes a Unicode object and returns the result as Python string +/* Encodes a Unicode object and returns the result as Python bytes

[issue10435] Document unicode C-API in reST

2010-11-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: If you have time, please take a look at PyUnicode_As{En,De}codedObject() and PyUnicode_As{En,De}DecodedUnicode() documentation in the attached patch. Thanks. I'll try to have a look later tonight.

[issue10435] Document unicode C-API in reST

2010-11-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Thanks for your work on this. Please see my comments below: --- Include/unicodeobject.h (revision 86478) +++ Include/unicodeobject.h (working copy) @@ -737,7 +737,7 @@ const char *errors /* error handling */ );

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: The following C-APIs are only documented in comments inside unicode.h: PyUnicode_GetMax PyUnicode_Resize PyUnicode_InternImmortal PyUnicode_FromOrdinal PyUnicode_GetDefaultEncoding PyUnicode_AsDecodedObject

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Tue, Nov 16, 2010 at 10:38 AM, M.-A. Lemburg m...@egenix.com wrote: Alexander Belopolsky wrote: .. I also have a similar question about C API.  Here, in absence of __all__, the answer should be clear: all symbols in

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +haypo, lemburg, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10435 ___

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: PyUnicode_AsDecodedObject() and PyUnicode_AsDecodedUnicode() appear to be broken as well: both start with a PyUnicode_Check(unicode) and then pass unicode to PyCodec_Decode() which expects bytes. --

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Please note that PyCodec_Encode()/PyCodec_Decode() will return whatever the codec returns for these operations. The codec system is not limited to converting between Unicode and bytes only. A typical example is a same-type codec such as

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Tue, Nov 16, 2010 at 5:54 PM, Marc-Andre Lemburg rep...@bugs.python.org wrote: Marc-Andre Lemburg m...@egenix.com added the comment: Please note that PyCodec_Encode()/PyCodec_Decode() will return whatever the codec

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Attached patch documents all previously undocumented unicode C API functions. Note that for the PyUnicode_As{En,De}codedObject() and PyUnicode_As{En,De}DecodedUnicode() functions I attempted to capture what they are

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Tue, Nov 16, 2010 at 7:19 PM, Marc-Andre Lemburg rep...@bugs.python.org wrote: .. * Decoding converts a bytes object encoded using a particular character set encoding to a string object.

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I agree and will handle this in #10435 because codecs.h s/#10435/#10439/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10435