mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
ANSI-fication and Py_PROTO extermination.
This commit is contained in:
parent
5eb6d4e3bf
commit
ea9cb5aebf
14 changed files with 340 additions and 338 deletions
|
|
@ -1,9 +1,3 @@
|
|||
#ifndef Py_FLOATOBJECT_H
|
||||
#define Py_FLOATOBJECT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***********************************************************
|
||||
Copyright (c) 2000, BeOpen.com.
|
||||
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
|
||||
|
|
@ -20,18 +14,24 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|||
PyFloatObject represents a (double precision) floating point number.
|
||||
*/
|
||||
|
||||
#ifndef Py_FLOATOBJECT_H
|
||||
#define Py_FLOATOBJECT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
double ob_fval;
|
||||
PyObject_HEAD
|
||||
double ob_fval;
|
||||
} PyFloatObject;
|
||||
|
||||
extern DL_IMPORT(PyTypeObject) PyFloat_Type;
|
||||
|
||||
#define PyFloat_Check(op) ((op)->ob_type == &PyFloat_Type)
|
||||
|
||||
extern DL_IMPORT(PyObject *) PyFloat_FromString Py_PROTO((PyObject*, char**));
|
||||
extern DL_IMPORT(PyObject *) PyFloat_FromDouble Py_PROTO((double));
|
||||
extern DL_IMPORT(double) PyFloat_AsDouble Py_PROTO((PyObject *));
|
||||
extern DL_IMPORT(PyObject *) PyFloat_FromString(PyObject*, char**);
|
||||
extern DL_IMPORT(PyObject *) PyFloat_FromDouble(double);
|
||||
extern DL_IMPORT(double) PyFloat_AsDouble(PyObject *);
|
||||
|
||||
/* Macro, trading safety for speed */
|
||||
#define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue