[Patches] [ python-Patches-645382 ] Don't FPE on FreeBSD...

noreply@sourceforge.net noreply@sourceforge.net
Thu, 28 Nov 2002 10:51:38 -0800


Patches item #645382, was opened at 2002-11-28 18:51
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=645382&group_id=5470

Category: Core (C code)
Group: Python 2.2.x
Status: Open
Resolution: None
Priority: 5
Submitted By: Ben Laurie (benl)
Assigned to: Nobody/Anonymous (nobody)
Summary: Don't FPE on FreeBSD...

Initial Comment:
--- Python-2.2.2/Objects/floatobject.c  Sun May 12
17:20:38 2002
+++ Python-2.2.2-ben/Objects/floatobject.c      Thu Nov
28 18:25:04 2002
@@ -645,7 +645,7 @@
        long aslong;            /* (long)wholepart */
 
        (void)modf(x, &wholepart);
-#ifdef RISCOS
+#if defined(RISCOS) || defined(__FreeBSD__)
        /* conversion from floating to integral type
would raise exception */
        if (wholepart>LONG_MAX || wholepart<LONG_MIN) {
                PyErr_SetString(PyExc_OverflowError,
"float too large to convert");


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=645382&group_id=5470