summaryrefslogtreecommitdiffstats
path: root/Include/floatobject.h
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 (GMT)
commit4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9 (patch)
treec8f1fef715f8d158e58f17cab14af65455de1d77 /Include/floatobject.h
parentc4df7845143f9afe0d20f4421a41904f3cbb991a (diff)
downloadcpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.zip
cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.gz
cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.bz2
Merge branches/pep-0384.
Diffstat (limited to 'Include/floatobject.h')
-rw-r--r--Include/floatobject.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/floatobject.h b/Include/floatobject.h
index 364b913..90f0a45 100644
--- a/Include/floatobject.h
+++ b/Include/floatobject.h
@@ -11,10 +11,12 @@ PyFloatObject represents a (double precision) floating point number.
extern "C" {
#endif
+#ifndef Py_LIMITED_API
typedef struct {
PyObject_HEAD
double ob_fval;
} PyFloatObject;
+#endif
PyAPI_DATA(PyTypeObject) PyFloat_Type;
@@ -45,8 +47,11 @@ PyAPI_FUNC(PyObject *) PyFloat_FromDouble(double);
/* Extract C double from Python float. The macro version trades safety for
speed. */
PyAPI_FUNC(double) PyFloat_AsDouble(PyObject *);
+#ifndef Py_LIMITED_API
#define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval)
+#endif
+#ifndef Py_LIMITED_API
/* _PyFloat_{Pack,Unpack}{4,8}
*
* The struct and pickle (at least) modules need an efficient platform-
@@ -110,6 +115,7 @@ PyAPI_FUNC(int) PyFloat_ClearFreeList(void);
PyAPI_FUNC(PyObject *) _PyFloat_FormatAdvanced(PyObject *obj,
Py_UNICODE *format_spec,
Py_ssize_t format_spec_len);
+#endif /* Py_LIMITED_API */
#ifdef __cplusplus
}