comparison mercurial/cext/dirs.c @ 48812:9b0f173445d1

cext: unconditionally use PyLong_FromLong() We no longer support Python 2. Differential Revision: https://phab.mercurial-scm.org/D12223
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Feb 2022 15:43:30 -0700
parents 83f0e93ec34b
children bf6cdda979ed
comparison
equal deleted inserted replaced
48811:92c430e7e37a 48812:9b0f173445d1
98 Py_CLEAR(key); 98 Py_CLEAR(key);
99 break; 99 break;
100 } 100 }
101 101
102 /* Force Python to not reuse a small shared int. */ 102 /* Force Python to not reuse a small shared int. */
103 #ifdef IS_PY3K
104 val = PyLong_FromLong(0x1eadbeef); 103 val = PyLong_FromLong(0x1eadbeef);
105 #else
106 val = PyInt_FromLong(0x1eadbeef);
107 #endif
108 104
109 if (val == NULL) 105 if (val == NULL)
110 goto bail; 106 goto bail;
111 107
112 PYLONG_VALUE(val) = 1; 108 PYLONG_VALUE(val) = 1;