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.

Author alexandre.vassalotti
Recipients alexandre.vassalotti, lemburg
Date 2008-05-09.22:31:22
SpamBayes Score 0.0014240925
Marked as misclassified No
Message-id <1210372288.18.0.0163444160616.issue2807@psf.upfronthosting.co.za>
In-reply-to
Content
Marc-Andre Lemburg noted:

  BTW: The API PyUnicode_AsString() is pretty useless by itself - there's
  no way to access the size information of the returned string without
  again going to the Unicode object.
  
  I'd suggest to remove the API altogether and not only deprecating it.
  
  Furthermore, the API PyUnicode_AsStringAndSize() does not follow the API
  signature of PyString_AsStringAndSize() in that it passes back the
  pointer to the string as output parameter. That should be changed as
  well. Note that PyString_AsStringAndSize() already does this for both
  8-bit strings and Unicode, so the special Unicode API is not really
  needed at all or you may want to rename PyString_AsStringAndSize() to
  PyUnicode_AsStringAndSize().
  
  Finally, since there are many cases where the string buffer contents are
  copied to a new buffer, it's probably worthwhile to add a new API which
  does the copying straight away and also deals with the overflow cases in
  a central place. I'd suggest PyUnicode_AsChar() (with an API like
  PyUnicode_AsWideChar()).
History
Date User Action Args
2008-05-09 22:31:29alexandre.vassalottisetspambayes_score: 0.00142409 -> 0.0014240925
recipients: + alexandre.vassalotti, lemburg
2008-05-09 22:31:28alexandre.vassalottisetspambayes_score: 0.00142409 -> 0.00142409
messageid: <1210372288.18.0.0163444160616.issue2807@psf.upfronthosting.co.za>
2008-05-09 22:31:26alexandre.vassalottilinkissue2807 messages
2008-05-09 22:31:23alexandre.vassalotticreate