Skip to content

Commit a9ed91e

Browse files
sir-sigurdserhiy-storchaka
authored andcommitted
bpo-27961: Replace PY_LONG_LONG with long long. (GH-15386)
1 parent 919f0bc commit a9ed91e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Lib/test/clinic.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ test_long_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nar
12691269
goto exit;
12701270
}
12711271
a = PyLong_AsLongLong(args[0]);
1272-
if (a == (PY_LONG_LONG)-1 && PyErr_Occurred()) {
1272+
if (a == -1 && PyErr_Occurred()) {
12731273
goto exit;
12741274
}
12751275
skip_optional:
@@ -1281,7 +1281,7 @@ exit:
12811281

12821282
static PyObject *
12831283
test_long_long_converter_impl(PyObject *module, long long a)
1284-
/*[clinic end generated code: output=3e8083f3aee4f18a input=d5fc81577ff4dd02]*/
1284+
/*[clinic end generated code: output=7143b585d7e433e8 input=d5fc81577ff4dd02]*/
12851285

12861286

12871287
/*[clinic input]

Modules/_testcapimodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4763,8 +4763,8 @@ dict_get_version(PyObject *self, PyObject *args)
47634763

47644764
version = dict->ma_version_tag;
47654765

4766-
Py_BUILD_ASSERT(sizeof(unsigned PY_LONG_LONG) >= sizeof(version));
4767-
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)version);
4766+
Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(version));
4767+
return PyLong_FromUnsignedLongLong((unsigned long long)version);
47684768
}
47694769

47704770

PC/pyconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
296296
# define SIZEOF_HKEY 8
297297
# define SIZEOF_SIZE_T 8
298298
/* configure.ac defines HAVE_LARGEFILE_SUPPORT iff
299-
sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t).
299+
sizeof(off_t) > sizeof(long), and sizeof(long long) >= sizeof(off_t).
300300
On Win64 the second condition is not true, but if fpos_t replaces off_t
301301
then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
302302
should define this. */

Tools/clinic/clinic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3016,7 +3016,7 @@ def parse_arg(self, argname, displayname):
30163016
goto exit;
30173017
}}}}
30183018
{paramname} = PyLong_AsLongLong({argname});
3019-
if ({paramname} == (PY_LONG_LONG)-1 && PyErr_Occurred()) {{{{
3019+
if ({paramname} == -1 && PyErr_Occurred()) {{{{
30203020
goto exit;
30213021
}}}}
30223022
""".format(argname=argname, paramname=self.name)

0 commit comments

Comments
 (0)