[Python-checkins] r56761 - in doctools/trunk/Doc-3k: c-api/concrete.rst library/bsddb.rst

georg.brandl python-checkins at python.org
Mon Aug 6 09:31:28 CEST 2007


Author: georg.brandl
Date: Mon Aug  6 09:31:28 2007
New Revision: 56761

Modified:
   doctools/trunk/Doc-3k/c-api/concrete.rst
   doctools/trunk/Doc-3k/library/bsddb.rst
Log:
Port rev. 56754, 56755.


Modified: doctools/trunk/Doc-3k/c-api/concrete.rst
==============================================================================
--- doctools/trunk/Doc-3k/c-api/concrete.rst	(original)
+++ doctools/trunk/Doc-3k/c-api/concrete.rst	Mon Aug  6 09:31:28 2007
@@ -1153,10 +1153,10 @@
    is *NULL*.
 
 
-.. cfunction:: PyObject* PyUnicode_FromString(const char *u)
+.. cfunction:: PyObject* PyUnicode_FromStringAndSize(const char *u, Py_ssize_t size)
 
-   Create a Unicode Object from the char buffer *u*. *u* must be 0-terminated, the
-   bytes will be interpreted as being latin-1 encoded. *u* may also be *NULL* which
+   Create a Unicode Object from the char buffer *u*.  The bytes will be interpreted
+   as being UTF-8 encoded.  *u* may also be *NULL* which
    causes the contents to be undefined. It is the user's responsibility to fill in
    the needed data.  The buffer is copied into the new object. If the buffer is not
    *NULL*, the return value might be a shared object. Therefore, modification of
@@ -1165,6 +1165,14 @@
    .. versionadded:: 3.0
 
 
+.. cfunction:: PyObject *PyUnicode_FromString(const char *u)
+
+   Create a Unicode object from an UTF-8 encoded null-terminated char buffer
+   *u*.
+
+   .. versionadded:: 3.0
+
+
 .. cfunction:: PyObject* PyUnicode_FromFormat(const char *format, ...)
 
    Take a C :cfunc:`printf`\ -style *format* string and a variable number of

Modified: doctools/trunk/Doc-3k/library/bsddb.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/bsddb.rst	(original)
+++ doctools/trunk/Doc-3k/library/bsddb.rst	Mon Aug  6 09:31:28 2007
@@ -78,6 +78,22 @@
    Consult the Berkeley DB documentation for their use and interpretation.
 
 
+.. class:: StringKeys(db)
+
+   Wrapper class around a DB object that supports string keys (rather than bytes).
+   All keys are encoded as UTF-8, then passed to the underlying object.
+   
+   .. versionadded:: 3.0
+
+
+.. class:: StringValues(db)
+
+   Wrapper class around a DB object that supports string values (rather than bytes).
+   All values are encoded as UTF-8, then passed to the underlying object.
+
+   .. versionadded:: 3.0
+
+
 .. seealso::
 
    Module :mod:`dbhash`


More information about the Python-checkins mailing list