File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -4828,21 +4828,12 @@ long_divmod(PyObject *a, PyObject *b)
48284828static PyLongObject *
48294829long_invmod (PyLongObject * a , PyLongObject * n )
48304830{
4831- PyLongObject * b , * c ;
4832-
48334831 /* Should only ever be called for positive n */
48344832 assert (_PyLong_IsPositive (n ));
48354833
4836- b = (PyLongObject * )PyLong_FromLong (1L );
4837- if (b == NULL ) {
4838- return NULL ;
4839- }
4840- c = (PyLongObject * )PyLong_FromLong (0L );
4841- if (c == NULL ) {
4842- Py_DECREF (b );
4843- return NULL ;
4844- }
48454834 Py_INCREF (a );
4835+ PyLongObject * b = (PyLongObject * )Py_NewRef (_PyLong_GetOne ());
4836+ PyLongObject * c = (PyLongObject * )Py_NewRef (_PyLong_GetZero ());
48464837 Py_INCREF (n );
48474838
48484839 /* references now owned: a, b, c, n */
You can’t perform that action at this time.
0 commit comments