[pypy-commit] pypy default: fix, on 32 bit platforms 1L<<31 overflows a 'l' parsed object
mattip
pypy.commits at gmail.com
Mon Sep 11 16:51:29 EDT 2017
Author: Matti Picus <matti.picus at gmail.com>
Branch:
Changeset: r92376:eeb144e01b46
Date: 2017-09-11 23:48 +0300
http://bitbucket.org/pypy/pypy/changeset/eeb144e01b46/
Log: fix, on 32 bit platforms 1L<<31 overflows a 'l' parsed object
diff --git a/pypy/module/cpyext/test/test_typeobject.py b/pypy/module/cpyext/test/test_typeobject.py
--- a/pypy/module/cpyext/test/test_typeobject.py
+++ b/pypy/module/cpyext/test/test_typeobject.py
@@ -1384,9 +1384,9 @@
module = self.import_extension('foo', [
("test_flags", "METH_VARARGS",
'''
- long in_flag, my_flag;
+ long long in_flag, my_flag;
PyObject * obj;
- if (!PyArg_ParseTuple(args, "Ol", &obj, &in_flag))
+ if (!PyArg_ParseTuple(args, "OL", &obj, &in_flag))
return NULL;
if (!PyType_Check(obj))
{
More information about the pypy-commit
mailing list