Landry Breuil <lan...@openbsd.org> added the comment:

Py_IS_INFINITY is defined as

#ifndef Py_IS_INFINITY
#  if defined HAVE_DECL_ISINF && HAVE_DECL_ISINF == 1
#    define Py_IS_INFINITY(X) isinf(X)
#  else
#    define Py_IS_INFINITY(X) ((X) &&                                   \
                               (Py_FORCE_DOUBLE(X)*0.5 == Py_FORCE_DOUBLE(X)))
#  endif
#endif


The test still fails when built --with-pydebug.

(gdb)  b isinf 
Function "isinf" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (isinf) pending.
(gdb) r
Starting program: /usr/obj/ports/Python-3.2.1/Python-3.2.1/python 
Breakpoint 2 at 0x852786d4: file /usr/src/lib/libc/gen/isinf.c, line 27.
Pending breakpoint "isinf" resolved
Python 3.2.1 (default, Jul 22 2011, 17:34:54) 
[GCC 4.2.1 20070719 ] on openbsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> int(float('inf'))
0
[56408 refs]

isinf is #defined in math.h to

#define isinf(x) \
        ((sizeof (x) == sizeof (float)) ? \
                __isinff(x) \
        : (sizeof (x) == sizeof (double)) ? \
                __isinf(x) \
        :       __isinfl(x))

but setting a bkp on it changes nothing.

Starting program: /usr/obj/ports/Python-3.2.1/Python-3.2.1/python 
Breakpoint 2 at 0x89b4f708: file /usr/src/lib/libc/gen/isinf.c, line 36.
Pending breakpoint "__isinff" resolved
Python 3.2.1 (default, Jul 22 2011, 17:34:54) 
[GCC 4.2.1 20070719 ] on openbsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> int(float('inf'))
0

Setting a bkp on PyLong_FromDouble() shows that it's not called.

Sorry, this doesnt make sense to me...

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12589>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to