[New-bugs-announce] [issue34234] Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7

Serhiy Storchaka report at bugs.python.org
Thu Jul 26 07:28:00 EDT 2018


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The proposed PR adds two private helpers

#define _PyAnyInt_Check(op) (PyInt_Check(op) || PyLong_Check(op))
#define _PyAnyInt_CheckExact(op) (PyInt_CheckExact(op) || PyLong_CheckExact(op))

and make it used it in the code. This may help to avoid bugs like issue34229.

----------
components: Interpreter Core
messages: 322415
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34234>
_______________________________________


More information about the New-bugs-announce mailing list