Skip to content

Commit f559951

Browse files
committed
BUG, BLD: Fix cast long double and double warnings(C)/errors(C++)
These errors/warnings occurs when sizeof(long double) == sizeof(double).
1 parent 5e25f1a commit f559951

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

numpy/core/include/numpy/npy_common.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,11 @@ typedef unsigned char npy_bool;
359359

360360

361361
#if NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE
362-
typedef double npy_longdouble;
363362
#define NPY_LONGDOUBLE_FMT "g"
364363
#else
365-
typedef long double npy_longdouble;
366364
#define NPY_LONGDOUBLE_FMT "Lg"
367365
#endif
366+
typedef long double npy_longdouble;
368367

369368
#ifndef Py_USING_UNICODE
370369
#error Must use Python with unicode enabled.

0 commit comments

Comments
 (0)