Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9f688bf

Browse files
committed
Some cleanup of longs in prepartion for Cray J90 fixes: got
rid of Py_PROTO, switched to ANSI function decls, and did some minor fiddling.
1 parent 4707320 commit 9f688bf

3 files changed

Lines changed: 120 additions & 256 deletions

File tree

Include/longintrepr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct _longobject {
5252
digit ob_digit[1];
5353
};
5454

55-
DL_IMPORT(PyLongObject *) _PyLong_New Py_PROTO((int));
55+
DL_IMPORT(PyLongObject *) _PyLong_New(int);
5656

5757
#ifdef __cplusplus
5858
}

Include/longobject.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ extern DL_IMPORT(PyTypeObject) PyLong_Type;
2222

2323
#define PyLong_Check(op) ((op)->ob_type == &PyLong_Type)
2424

25-
extern DL_IMPORT(PyObject *) PyLong_FromLong Py_PROTO((long));
26-
extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLong Py_PROTO((unsigned long));
27-
extern DL_IMPORT(PyObject *) PyLong_FromDouble Py_PROTO((double));
28-
extern DL_IMPORT(long) PyLong_AsLong Py_PROTO((PyObject *));
29-
extern DL_IMPORT(unsigned long) PyLong_AsUnsignedLong Py_PROTO((PyObject *));
30-
extern DL_IMPORT(double) PyLong_AsDouble Py_PROTO((PyObject *));
31-
extern DL_IMPORT(PyObject *) PyLong_FromVoidPtr Py_PROTO((void *));
32-
extern DL_IMPORT(void *) PyLong_AsVoidPtr Py_PROTO((PyObject *));
25+
extern DL_IMPORT(PyObject *) PyLong_FromLong(long);
26+
extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLong(unsigned long);
27+
extern DL_IMPORT(PyObject *) PyLong_FromDouble(double);
28+
extern DL_IMPORT(long) PyLong_AsLong(PyObject *);
29+
extern DL_IMPORT(unsigned long) PyLong_AsUnsignedLong(PyObject *);
30+
extern DL_IMPORT(double) PyLong_AsDouble(PyObject *);
31+
extern DL_IMPORT(PyObject *) PyLong_FromVoidPtr(void *);
32+
extern DL_IMPORT(void *) PyLong_AsVoidPtr(PyObject *);
3333

3434
#ifdef HAVE_LONG_LONG
3535

@@ -54,14 +54,14 @@ extern DL_IMPORT(void *) PyLong_AsVoidPtr Py_PROTO((PyObject *));
5454
#define LONG_LONG long long
5555
#endif
5656

57-
extern DL_IMPORT(PyObject *) PyLong_FromLongLong Py_PROTO((LONG_LONG));
58-
extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLongLong Py_PROTO((unsigned LONG_LONG));
59-
extern DL_IMPORT(LONG_LONG) PyLong_AsLongLong Py_PROTO((PyObject *));
60-
extern DL_IMPORT(unsigned LONG_LONG) PyLong_AsUnsignedLongLong Py_PROTO((PyObject *));
57+
extern DL_IMPORT(PyObject *) PyLong_FromLongLong(LONG_LONG);
58+
extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLongLong(unsigned LONG_LONG);
59+
extern DL_IMPORT(LONG_LONG) PyLong_AsLongLong(PyObject *);
60+
extern DL_IMPORT(unsigned LONG_LONG) PyLong_AsUnsignedLongLong(PyObject *);
6161
#endif /* HAVE_LONG_LONG */
6262

63-
DL_IMPORT(PyObject *) PyLong_FromString Py_PROTO((char *, char **, int));
64-
DL_IMPORT(PyObject *) PyLong_FromUnicode Py_PROTO((Py_UNICODE*, int, int));
63+
DL_IMPORT(PyObject *) PyLong_FromString(char *, char **, int);
64+
DL_IMPORT(PyObject *) PyLong_FromUnicode(Py_UNICODE*, int, int);
6565

6666
#ifdef __cplusplus
6767
}

0 commit comments

Comments
 (0)