annotate Include/pystrtod.h @ 79675:c0a2294de787 2.7

Issue #16199: Backport 2to3 typo fix from 3.2.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Thu, 11 Oct 2012 16:15:46 -0700
parents 41be2c69619b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32305
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
1 #ifndef Py_STRTOD_H
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
2 #define Py_STRTOD_H
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
3
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
4 #ifdef __cplusplus
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
5 extern "C" {
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
6 #endif
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
7
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
8
33070
4e6f4e9ec9b3 Patch #1006003: Cygwin standard module build problems
Jason Tishler <jason@tishler.net>
parents: 32305
diff changeset
9 PyAPI_FUNC(double) PyOS_ascii_strtod(const char *str, char **ptr);
4e6f4e9ec9b3 Patch #1006003: Cygwin standard module build problems
Jason Tishler <jason@tishler.net>
parents: 32305
diff changeset
10 PyAPI_FUNC(double) PyOS_ascii_atof(const char *str);
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 53312
diff changeset
11
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 53312
diff changeset
12 /* Deprecated in 2.7 and 3.1. Will disappear in 2.8 (if it exists) and 3.2 */
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 53312
diff changeset
13 PyAPI_FUNC(char *) PyOS_ascii_formatd(char *buffer, size_t buf_len,
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 53312
diff changeset
14 const char *format, double d);
56765
41be2c69619b Issue #7117: Backport missing pystrtod.h declarations from py3k.
Mark Dickinson <dickinsm@gmail.com>
parents: 56758
diff changeset
15 PyAPI_FUNC(double) PyOS_string_to_double(const char *str,
41be2c69619b Issue #7117: Backport missing pystrtod.h declarations from py3k.
Mark Dickinson <dickinsm@gmail.com>
parents: 56758
diff changeset
16 char **endptr,
41be2c69619b Issue #7117: Backport missing pystrtod.h declarations from py3k.
Mark Dickinson <dickinsm@gmail.com>
parents: 56758
diff changeset
17 PyObject *overflow_exception);
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 53312
diff changeset
18
53312
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
19 /* The caller is responsible for calling PyMem_Free to free the buffer
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
20 that's is returned. */
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
21 PyAPI_FUNC(char *) PyOS_double_to_string(double val,
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
22 char format_code,
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
23 int precision,
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
24 int flags,
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
25 int *type);
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
26
56765
41be2c69619b Issue #7117: Backport missing pystrtod.h declarations from py3k.
Mark Dickinson <dickinsm@gmail.com>
parents: 56758
diff changeset
27 PyAPI_FUNC(double) _Py_parse_inf_or_nan(const char *p, char **endptr);
41be2c69619b Issue #7117: Backport missing pystrtod.h declarations from py3k.
Mark Dickinson <dickinsm@gmail.com>
parents: 56758
diff changeset
28
53312
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
29
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
30 /* PyOS_double_to_string's "flags" parameter can be set to 0 or more of: */
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
31 #define Py_DTSF_SIGN 0x01 /* always add the sign */
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
32 #define Py_DTSF_ADD_DOT_0 0x02 /* if the result is an integer add ".0" */
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
33 #define Py_DTSF_ALT 0x04 /* "alternate" formatting. it's format_code
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
34 specific */
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
35
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
36 /* PyOS_double_to_string's "type", if non-NULL, will be set to one of: */
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
37 #define Py_DTST_FINITE 0
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
38 #define Py_DTST_INFINITE 1
c5e0d9beebf9 Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents: 36501
diff changeset
39 #define Py_DTST_NAN 2
32305
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
40
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
41 #ifdef __cplusplus
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
42 }
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
43 #endif
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
44
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff changeset
45 #endif /* !Py_STRTOD_H */