]> granicus.if.org Git - python/commitdiff
Issue #7169: Document PyFloat_AsString and PyFloat_AsReprString, and note that they...
authorEric Smith <eric@trueblade.com>
Mon, 19 Oct 2009 14:38:14 +0000 (14:38 +0000)
committerEric Smith <eric@trueblade.com>
Mon, 19 Oct 2009 14:38:14 +0000 (14:38 +0000)
Doc/c-api/float.rst
Misc/NEWS

index c4099a305753b11a0d6a552216a8ec717e35bf29..295fb90d05d808130052ec351bf4bd66d0254b04 100644 (file)
@@ -92,3 +92,27 @@ Floating Point Objects
    be freed.
 
    .. versionadded:: 2.6
+
+
+.. cfunction:: void PyFloat_AsString(char *buf, PyFloatObject *v)
+
+   Convert the argument *v* to a string, using the same rules as
+   :func:`str`. The length of *buf* should be at least 100.
+
+   This function is unsafe to call because it writes to a buffer whose
+   length it does not know.
+
+   .. deprecated:: 2.7
+      Use :func:`PyObject_Str` or :func:`PyOS_double_to_string` instead.
+
+
+.. cfunction:: void PyFloat_AsReprString(char *buf, PyFloatObject *v)
+
+   Same as PyFloat_AsString, except uses the same rules as
+   :func:`repr`.  The length of *buf* should be at least 100.
+
+   This function is unsafe to call because it writes to a buffer whose
+   length it does not know.
+
+   .. deprecated:: 2.7
+      Use :func:`PyObject_Repr` or :func:`PyOS_double_to_string` instead.
index f6843259feecf1a06e2340d61dcbb574e8495f1b..38c29bab6d4777c6b23956cbc000e95eda59f355 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 2.7 alpha 1
 Core and Builtins
 -----------------
 
+- Issue #7168: Document PyFloat_AsString and PyFloat_AsReprString, and
+  note that they are unsafe and deprecated.
+
 - Issue #7120: logging: Removed import of multiprocessing which is causing
   crash in GAE.